@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface Param
For methods annotated with Listener or Subscription
whose 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 Listener or Subscription
annotation must be the same defined by the Param annotation.
public abstract String value
Copyright © 2008–2014 Dojo Foundation. All rights reserved.