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@934: /** Static methods in classes annotated by {@link Model} or {@link Page} jaroslav@934: * can be marked by this annotation establish a JSON communication point. jaroslav@934: * The associated model page then gets new method to invoke a network jaroslav@934: * connection jaroslav@934: * jaroslav@934: * @author Jaroslav Tulach jaroslav@934: */ jaroslav@934: @Retention(RetentionPolicy.SOURCE) jaroslav@934: @Target(ElementType.METHOD) 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@934: }