@ManagedService(path="{room: [a-zA-Z][a-zA-Z_0-9]*}")
public class ChatRoom
extends Object
| Constructor and Description |
|---|
ChatRoom() |
| Modifier and Type | Method and Description |
|---|---|
void |
onDisconnect(org.atmosphere.cpr.AtmosphereResourceEvent event)
Invoked when the client disconnect or when an unexpected closing of the underlying connection happens.
|
ChatProtocol |
onMessage(ChatProtocol message)
Simple annotated class that demonstrate how
Encoder and {@link org.atmosphere.config.managed.Decoder
can be used. |
void |
onPrivateMessage(UserMessage user) |
ChatProtocol |
onReady(org.atmosphere.cpr.AtmosphereResource r)
Invoked when the connection as been fully established and suspended, e.g ready for receiving messages.
|
public ChatProtocol onReady(org.atmosphere.cpr.AtmosphereResource r)
r - public void onDisconnect(org.atmosphere.cpr.AtmosphereResourceEvent event)
event - public ChatProtocol onMessage(ChatProtocol message) throws IOException
Encoder and {@link org.atmosphere.config.managed.Decoder
can be used.message - an instance of ChatProtocolIOExceptionpublic void onPrivateMessage(UserMessage user) throws IOException
IOExceptionCopyright © 2013. All Rights Reserved.