Package org.cometd.annotation.server
Annotation Type RemoteCall
@Target(METHOD)
@Retention(RUNTIME)
@Documented
public @interface RemoteCall
Identifies callback methods on server-side services that are invoked when the client is performing a remote call.
Methods annotated with this annotation must have the following signature:
@Service public class RemoteService { @Session private LocalSession sender; @RemoteCall("/foo") public void service(RemoteCall.Caller caller, Object data) { call.result(sender, process(data)); } }
- See Also:
RemoteCall.Caller
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RemoteCall.Caller
Objects implementing this interface represent remote clients that performed remote calls. -
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String[]
value
Returns the list of remote call target strings used by clients to identify the target of remote calls.
-
Element Details
-
value
java.lang.String[] valueReturns the list of remote call target strings used by clients to identify the target of remote calls.
The target strings are interpreted as a channel string and therefore may only contain characters valid for a channel; they may contain arguments (for example: @RemoteCall("/foo/{p}"), but they may not be wildcard channels.
- Returns:
- the list of remote call targets to which the annotated method responds to
-