org.atmosphere.samples.chat
Class SSEAtmosphereHandler
java.lang.Object
org.atmosphere.handler.AbstractReflectorAtmosphereHandler
org.atmosphere.handler.OnMessage<String>
org.atmosphere.samples.chat.SSEAtmosphereHandler
- All Implemented Interfaces:
- org.atmosphere.cpr.AtmosphereHandler
@AtmosphereHandlerService(path="/chat",
interceptors={org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor.class,org.atmosphere.interceptor.BroadcastOnPostAtmosphereInterceptor.class})
public class SSEAtmosphereHandler- extends org.atmosphere.handler.OnMessage<String>
Simple AtmosphereHandler that implement the logic to build a Server Side Events Chat application.
- Author:
- Jeanfrancois Arcand
| Nested classes/interfaces inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler |
org.atmosphere.handler.AbstractReflectorAtmosphereHandler.Default |
| Fields inherited from class org.atmosphere.handler.OnMessage |
MESSAGE_DELIMITER |
|
Method Summary |
void |
onDisconnect(org.atmosphere.cpr.AtmosphereResponse response)
|
void |
onMessage(org.atmosphere.cpr.AtmosphereResponse response,
String message)
|
| Methods inherited from class org.atmosphere.handler.OnMessage |
destroy, onOpen, onRequest, onResume, onStateChange, onTimeout |
| Methods inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler |
postStateChange |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSEAtmosphereHandler
public SSEAtmosphereHandler()
onMessage
public void onMessage(org.atmosphere.cpr.AtmosphereResponse response,
String message)
throws IOException
- Specified by:
onMessage in class org.atmosphere.handler.OnMessage<String>
- Throws:
IOException
onDisconnect
public void onDisconnect(org.atmosphere.cpr.AtmosphereResponse response)
throws IOException
- Overrides:
onDisconnect in class org.atmosphere.handler.OnMessage<String>
- Throws:
IOException
Copyright © 2014. All Rights Reserved.