org.atmosphere.handler
Class ManagedAtmosphereHandler
java.lang.Object
org.atmosphere.handler.ManagedAtmosphereHandler
- All Implemented Interfaces:
- AtmosphereHandler
public class ManagedAtmosphereHandler
- extends Object
- implements AtmosphereHandler
| 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.
- Specified by:
onRequest in interface AtmosphereHandler
- Parameters:
resource - an AtmosphereResource
- Throws:
IOException
onStateChange
public void onStateChange(AtmosphereResourceEvent event)
throws IOException
- Description copied from interface:
AtmosphereHandler
- This method is invoked when the
Broadcaster execute a broadcast
operations. When this method is invoked its associated Broadcaster, any
suspended connection will be allowed to write the data back to its
associated clients.
This method will also be invoked when a response get resumed,
e.g. when AtmosphereResource.resume() gets invoked. In that case,
AtmosphereResourceEvent.isResuming() will return true.
This method will also be invoked when the AtmosphereResource.suspend(long)
expires. In that case, AtmosphereResourceEvent.isResumedOnTimeout() will return
true
- Specified by:
onStateChange in interface AtmosphereHandler
- Parameters:
event - an AtmosphereResourceEvent
- Throws:
IOException
destroy
public void destroy()
- Description copied from interface:
AtmosphereHandler
- Destroy this handler
- Specified by:
destroy in interface AtmosphereHandler
Copyright © 2013. All Rights Reserved.