|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.samples.chat.SockjsChat
@Config
@ManagedService(path="/chat",
interceptors=org.atmosphere.interceptor.SuspendTrackerInterceptor.class)
public class SockjsChat
Simple annotated class that demonstrate the power of Atmosphere. This class supports all transports, support
heart beat, message cache thanks to the ManagedService annotation.
The will make sure Sockjs client message are
serialized/deserialized properly.
| Constructor Summary | |
|---|---|
SockjsChat()
|
|
| Method Summary | |
|---|---|
void |
onDisconnect(org.atmosphere.cpr.AtmosphereResourceEvent event)
Invoked when the client disconnect or when an unexpected closing of the underlying connection happens. |
Message |
onMessage(Message message)
Simple annotated class that demonstrate how Encoder and {@link org.atmosphere.config.managed.Decoder
can be used. |
void |
onReady(org.atmosphere.cpr.AtmosphereResource r)
Invoked when the connection as been fully established and suspended, e.g ready for receiving messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SockjsChat()
| Method Detail |
|---|
public void onReady(org.atmosphere.cpr.AtmosphereResource r)
r - public void onDisconnect(org.atmosphere.cpr.AtmosphereResourceEvent event)
event -
public Message onMessage(Message message)
throws IOException
Encoder and {@link org.atmosphere.config.managed.Decoder
can be used.
message - an instance of Message
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||