Package org.atmosphere.handler
Class AtmosphereHandlerAdapter
java.lang.Object
org.atmosphere.handler.AtmosphereHandlerAdapter
- All Implemented Interfaces:
AtmosphereHandler
An implementation of
AtmosphereHandler that does nothing.- Author:
- Jeanfrancois Arcand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy this handlervoidonRequest(AtmosphereResource resource) When a client sends a request to its associatedAtmosphereHandler, it can decide if the underlying connection can be suspended (creating a Continuation) or handle the connection synchronously.voidThis method is invoked when theBroadcasterexecutes a broadcast operation.
-
Constructor Details
-
AtmosphereHandlerAdapter
public AtmosphereHandlerAdapter()
-
-
Method Details
-
onRequest
Description copied from interface:AtmosphereHandlerWhen a client sends a request to its associatedAtmosphereHandler, 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.- Specified by:
onRequestin interfaceAtmosphereHandler- Parameters:
resource- anAtmosphereResource- Throws:
IOException
-
onStateChange
Description copied from interface:AtmosphereHandlerThis method is invoked when theBroadcasterexecutes a broadcast operation. When this method is invoked its associatedBroadcaster, 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. whenAtmosphereResource.resume()gets invoked. In that case,AtmosphereResourceEvent.isResuming()will return true. This method will also be invoked when theAtmosphereResource.suspend(long)expires. In that case,AtmosphereResourceEvent.isResumedOnTimeout()will return true.- Specified by:
onStateChangein interfaceAtmosphereHandler- Parameters:
event- anAtmosphereResourceEvent- Throws:
IOException
-
destroy
public void destroy()Description copied from interface:AtmosphereHandlerDestroy this handler- Specified by:
destroyin interfaceAtmosphereHandler
-