Package org.cometd.annotation
Annotation Type Param
-
@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface ParamFor methods annotated with
ListenerorSubscriptionwhose value is a channel template such as/game/{gameId}, this annotation binds parameters of those methods with the value obtained matching the actual channel with the channel template.For example:
@Service public class GameService { @Listener("/game/{gameId}") public void handleGame(ServerSession remote, ServerMessage.Mutable message, @Param("gameId") String gameId) { // Use the 'gameId' parameter here. } }The variable name defined in the
ListenerorSubscriptionannotation must be the same defined by theParamannotation.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Stringvalue
-