|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.handler.AbstractReflectorAtmosphereHandler
org.atmosphere.config.managed.ManagedAtmosphereHandler
public class ManagedAtmosphereHandler
An internal implementation of AtmosphereHandler that implement support for Atmosphere 2.0 annotations.
| Nested Class Summary | |
|---|---|
static class |
ManagedAtmosphereHandler.Managed
|
static class |
ManagedAtmosphereHandler.MethodInfo
|
| Nested classes/interfaces inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler |
|---|
AbstractReflectorAtmosphereHandler.Default |
| Constructor Summary | |
|---|---|
ManagedAtmosphereHandler()
|
|
| Method Summary | |
|---|---|
AnnotatedProxy |
configure(AtmosphereConfig config,
Object c)
Configure the proxy. |
protected void |
deliver(Object o,
DeliverTo deliverConfig,
DeliverTo.DELIVER_TO defaultDeliver,
AtmosphereResource r)
Delivers the given message according to the specified {@link DeliverTo configuration). |
void |
onHeartbeat(AtmosphereResourceEvent event)
Notifies the heartbeat for the given resource to the annotated method if exists. |
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()
|
| Methods inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler |
|---|
destroy, postStateChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.atmosphere.cpr.AtmosphereHandler |
|---|
destroy |
| Constructor Detail |
|---|
public ManagedAtmosphereHandler()
| Method Detail |
|---|
public AnnotatedProxy configure(AtmosphereConfig config,
Object c)
AnnotatedProxy
configure in interface AnnotatedProxy
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 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 AtmosphereResource
IOException
public 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)
protected void deliver(Object o,
DeliverTo deliverConfig,
DeliverTo.DELIVER_TO defaultDeliver,
AtmosphereResource r)
Delivers the given message according to the specified {@link DeliverTo configuration).
o - the messagedeliverConfig - the annotation statedefaultDeliver - the strategy applied if deliverConfig is nullr - the resourcepublic void onHeartbeat(AtmosphereResourceEvent event)
Notifies the heartbeat for the given resource to the annotated method if exists.
onHeartbeat in interface AtmosphereResourceHeartbeatEventListenerevent - the eventpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||