@ManagedService(path="/im/{room: [a-zA-Z][a-zA-Z_0-9]*}")
public class ChatRoom
extends Object
ManagedService.| 构造器和说明 |
|---|
ChatRoom() |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
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 - resourcepublic void onDisconnect(org.atmosphere.cpr.AtmosphereResourceEvent event)
event - resourceeventpublic ChatProtocol onMessage(ChatProtocol message) throws IOException
IOExceptionpublic void onPrivateMessage(UserMessage user) throws IOException
IOExceptionCopyright © 2014. All rights reserved.