|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.handler.AtmosphereHandlerAdapter
public class AtmosphereHandlerAdapter
An implementation of AtmosphereHandler that doesn't nothing.
| Constructor Summary | |
|---|---|
AtmosphereHandlerAdapter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy this handler |
void |
onRequest(AtmosphereResource resource)
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. |
void |
onStateChange(AtmosphereResourceEvent event)
This method is invoked when the Broadcaster execute a broadcast
operations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AtmosphereHandlerAdapter()
| Method Detail |
|---|
public 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 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.
onRequest in interface AtmosphereHandlerresource - an AtmosphereResource
IOException
public void onStateChange(AtmosphereResourceEvent event)
throws IOException
AtmosphereHandlerBroadcaster 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. AtmosphereResource.resume() gets invoked. In that case,
AtmosphereResourceEvent.isResuming() will return true.AtmosphereResource.suspend(long)
expires. In that case, AtmosphereResourceEvent.isResumedOnTimeout() will return
true
onStateChange in interface AtmosphereHandlerevent - an AtmosphereResourceEvent
IOExceptionpublic void destroy()
AtmosphereHandler
destroy in interface AtmosphereHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||