javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/OnReceive.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 24 Feb 2015 11:12:53 +0100
changeset 1787 ea12a3bb4b33
parent 1023 ad9a37489365
permissions -rw-r--r--
Using year range 2012-2015 in copyright header
jaroslav@934
     1
/**
jaroslav@934
     2
 * Back 2 Browser Bytecode Translator
jaroslav@1787
     3
 * Copyright (C) 2012-2015 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@934
     4
 *
jaroslav@934
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@934
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@934
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@934
     8
 *
jaroslav@934
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@934
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@934
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@934
    12
 * GNU General Public License for more details.
jaroslav@934
    13
 *
jaroslav@934
    14
 * You should have received a copy of the GNU General Public License
jaroslav@934
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@934
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@934
    17
 */
jaroslav@934
    18
package org.apidesign.bck2brwsr.htmlpage.api;
jaroslav@934
    19
jaroslav@934
    20
import java.lang.annotation.ElementType;
jaroslav@934
    21
import java.lang.annotation.Retention;
jaroslav@934
    22
import java.lang.annotation.RetentionPolicy;
jaroslav@934
    23
import java.lang.annotation.Target;
jaroslav@934
    24
jaroslav@1023
    25
/** 
jaroslav@1023
    26
 * @deprecated Replaced by new {@link net.java.html.json.OnReceive net.java.html.json} API.
jaroslav@934
    27
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@964
    28
 * @since 0.6
jaroslav@934
    29
 */
jaroslav@934
    30
@Retention(RetentionPolicy.SOURCE)
jaroslav@934
    31
@Target(ElementType.METHOD)
jaroslav@1023
    32
@Deprecated
jaroslav@934
    33
public @interface OnReceive {
jaroslav@934
    34
    /** The URL to connect to. Can contain variable names surrounded by '{' and '}'.
jaroslav@934
    35
     * Those parameters will then become variables of the associated method.
jaroslav@934
    36
     * 
jaroslav@934
    37
     * @return the (possibly parametrized) url to connect to
jaroslav@934
    38
     */
jaroslav@934
    39
    String url();
jaroslav@954
    40
    
jaroslav@954
    41
    /** Support for <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a> requires
jaroslav@954
    42
     * a callback from the server generated page to a function defined in the
jaroslav@954
    43
     * system. The name of such function is usually specified as a property
jaroslav@954
    44
     * (of possibly different names). By defining the <code>jsonp</code> attribute
jaroslav@954
    45
     * one turns on the <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a> 
jaroslav@954
    46
     * transmission and specifies the name of the property. The property should
jaroslav@954
    47
     * also be used in the {@link #url()} attribute on appropriate place.
jaroslav@954
    48
     * 
jaroslav@954
    49
     * @return name of a property to carry the name of <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a>
jaroslav@954
    50
     *    callback function.
jaroslav@954
    51
     */
jaroslav@954
    52
    String jsonp() default "";
jaroslav@934
    53
}