@Subscribe(value="channel")
public String handshake()
Subscribe to "channel" distribution. With comet, the http connection will be suspended. With websocket,
the handshake will gets executed.
Returns:
null - no message is send back to browser yet.
onMessage
@Publish(value="channel")
public String onMessage(String message)
Broadcast messages to the "channel" distribution. This method gets invoked when a WebSocket message arrive and distributed to
all websocket connection that has invoked the handshake method. Note that comet application will works as well
when sending POST.
Parameters:
message - the message to distribute
Returns:
the message that will be send to the "channel" distribution.