Package org.cometd.annotation
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,Listener
-
Element Details
-
value
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
-