org.atmosphere.config.managed
public class ManagedAtmosphereHandler extends AbstractReflectorAtmosphereHandler implements AnnotatedProxy
AtmosphereHandler that implement support for Atmosphere 2.0 annotations.| Modifier and Type | Class and Description |
|---|---|
static class |
ManagedAtmosphereHandler.Managed |
static class |
ManagedAtmosphereHandler.MethodInfo |
| Constructor and Description |
|---|
ManagedAtmosphereHandler() |
| Modifier and Type | Method and Description |
|---|---|
AnnotatedProxy |
configure(AtmosphereConfig config,
Object c)
Configure the proxy.
|
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(). |
boolean |
pathParams()
Return true if
PathParam are supported. |
protected boolean |
pathParams(Object o) |
protected void |
processReady(AtmosphereResource r) |
Object |
target()
The Object the
AtmosphereHandler is proxying. |
String |
toString() |
destroy, postStateChangeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdestroypublic AnnotatedProxy configure(AtmosphereConfig config, Object c)
AnnotatedProxyconfigure in interface AnnotatedProxypublic void onRequest(AtmosphereResource resource) throws 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 AtmosphereResourceIOExceptionpublic void onStateChange(AtmosphereResourceEvent event) throws 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()IOExceptionpublic boolean pathParams()
AnnotatedProxyPathParam are supported.pathParams in interface AnnotatedProxyPathParam are supported.protected boolean pathParams(Object o)
public Object target()
AnnotatedProxyAtmosphereHandler is proxying.target in interface AnnotatedProxyprotected void processReady(AtmosphereResource r)
Copyright © 2014. All Rights Reserved.