org.atmosphere.handler
Class ManagedAtmosphereHandler
java.lang.Object
org.atmosphere.handler.AbstractReflectorAtmosphereHandler
org.atmosphere.handler.ManagedAtmosphereHandler
- All Implemented Interfaces:
- AtmosphereHandler
public class ManagedAtmosphereHandler
- extends AbstractReflectorAtmosphereHandler
An internal implementation of AtmosphereHandler that implement supports for Atmosphere 1.1 annotation.
- Author:
- Jeanfrancois
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedAtmosphereHandler
public ManagedAtmosphereHandler(Object c)
onRequest
public void onRequest(AtmosphereResource resource)
throws IOException
- Description copied from interface:
AtmosphereHandler
- When a client send a request to its associated
AtmosphereHandler, it can decide
if the underlying connection can be suspended (creating a Continuation)
or handle the connection synchronously.
It is recommended to only suspend request for which HTTP method is a GET
and use the POST method to send data to the server, without marking the
connection as asynchronous.
- Parameters:
resource - an AtmosphereResource
- Throws:
IOException
onStateChange
public void onStateChange(AtmosphereResourceEvent event)
throws IOException
- Description copied from class:
AbstractReflectorAtmosphereHandler
- Write the
AtmosphereResourceEvent.getMessage() back to the client using
the AtmosphereResponse.getOutputStream() or AtmosphereResponse.getWriter().
If a Serializer is defined, it will be invoked and the writ operation
will be delegated to to it.
By default, this method will try to use AtmosphereResponse.getWriter().
- Specified by:
onStateChange in interface AtmosphereHandler- Overrides:
onStateChange in class AbstractReflectorAtmosphereHandler
- Parameters:
event - the AtmosphereResourceEvent.getMessage()
- Throws:
IOException
object
public Object object()
Copyright © 2013. All Rights Reserved.