jaroslav@934: /** jaroslav@934: * Back 2 Browser Bytecode Translator jaroslav@934: * Copyright (C) 2012 Jaroslav Tulach jaroslav@934: * jaroslav@934: * This program is free software: you can redistribute it and/or modify jaroslav@934: * it under the terms of the GNU General Public License as published by jaroslav@934: * the Free Software Foundation, version 2 of the License. jaroslav@934: * jaroslav@934: * This program is distributed in the hope that it will be useful, jaroslav@934: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@934: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@934: * GNU General Public License for more details. jaroslav@934: * jaroslav@934: * You should have received a copy of the GNU General Public License jaroslav@934: * along with this program. Look for COPYING file in the top folder. jaroslav@934: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@934: */ jaroslav@934: package org.apidesign.bck2brwsr.htmlpage.api; jaroslav@934: jaroslav@934: import java.lang.annotation.ElementType; jaroslav@934: import java.lang.annotation.Retention; jaroslav@934: import java.lang.annotation.RetentionPolicy; jaroslav@934: import java.lang.annotation.Target; jaroslav@934: jaroslav@1023: /** jaroslav@1023: * @deprecated Replaced by new {@link net.java.html.json.OnReceive net.java.html.json} API. jaroslav@934: * @author Jaroslav Tulach jaroslav@964: * @since 0.6 jaroslav@934: */ jaroslav@934: @Retention(RetentionPolicy.SOURCE) jaroslav@934: @Target(ElementType.METHOD) jaroslav@1023: @Deprecated jaroslav@934: public @interface OnReceive { jaroslav@934: /** The URL to connect to. Can contain variable names surrounded by '{' and '}'. jaroslav@934: * Those parameters will then become variables of the associated method. jaroslav@934: * jaroslav@934: * @return the (possibly parametrized) url to connect to jaroslav@934: */ jaroslav@934: String url(); jaroslav@954: jaroslav@954: /** Support for JSONP requires jaroslav@954: * a callback from the server generated page to a function defined in the jaroslav@954: * system. The name of such function is usually specified as a property jaroslav@954: * (of possibly different names). By defining the jsonp attribute jaroslav@954: * one turns on the JSONP jaroslav@954: * transmission and specifies the name of the property. The property should jaroslav@954: * also be used in the {@link #url()} attribute on appropriate place. jaroslav@954: * jaroslav@954: * @return name of a property to carry the name of JSONP jaroslav@954: * callback function. jaroslav@954: */ jaroslav@954: String jsonp() default ""; jaroslav@934: }