public class ManagedAtmosphereHandler extends AbstractReflectorAtmosphereHandler implements AnnotatedProxy
AtmosphereHandler that implement support for Atmosphere 2.0 annotations.| Constructor and Description |
|---|
ManagedAtmosphereHandler(java.lang.Object c) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
invoke(AtmosphereResource resource,
java.lang.Object msg) |
void |
onRequest(AtmosphereResource resource)
When a client sends a request to its associated
AtmosphereHandler, it can decide if the underlying
connection can be suspended (creating a Continuation) or handle the connection synchronously. |
void |
onStateChange(AtmosphereResourceEvent event)
Write the
AtmosphereResourceEvent.getMessage() back to the client using
the AtmosphereResponse.getOutputStream() or AtmosphereResponse.getWriter(). |
protected void |
processReady(AtmosphereResource r) |
java.lang.Object |
target()
The Object the
AtmosphereHandler is proxying. |
java.lang.String |
toString() |
destroy, postStateChangepublic void onRequest(AtmosphereResource resource) throws java.io.IOException
AtmosphereHandlerAtmosphereHandler, it can decide if the underlying
connection can be suspended (creating a Continuation) or handle the connection synchronously.
It is recommended to only suspend requests for which HTTP method is a GET and use the POST method to send data
to the server, without marking the connection as asynchronous.onRequest in interface AtmosphereHandlerresource - an AtmosphereResourcejava.io.IOExceptionpublic void onStateChange(AtmosphereResourceEvent event) throws java.io.IOException
AbstractReflectorAtmosphereHandlerAtmosphereResourceEvent.getMessage() back to the client using
the AtmosphereResponse.getOutputStream() or AtmosphereResponse.getWriter().
If a Serializer is defined, it will be invoked and the write operation
will be delegated to it.
By default, this method will try to use AtmosphereResponse.getWriter().onStateChange in interface AtmosphereHandleronStateChange in class AbstractReflectorAtmosphereHandlerevent - the AtmosphereResourceEvent.getMessage()java.io.IOExceptionpublic java.lang.Object invoke(AtmosphereResource resource, java.lang.Object msg) throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object target()
AnnotatedProxyAtmosphereHandler is proxying.target in interface AnnotatedProxyprotected void processReady(AtmosphereResource r)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.