public class StompSendActionAtmosphereHandler
extends org.atmosphere.handler.AbstractReflectorAtmosphereHandler
implements org.atmosphere.cpr.AtmosphereResourceHeartbeatEventListener
This handler wraps the method to be invoked when the send action is performed
with a STOMP frame. The frame indicates the particular destination
which is mapped to the appropriate annotated method.
| Constructor and Description |
|---|
StompSendActionAtmosphereHandler(Object toProxy,
Method method,
org.atmosphere.config.managed.Encoder<Object,String> encoder,
org.atmosphere.config.managed.Decoder<String,?> decoder,
org.atmosphere.cpr.Broadcaster broadcaster,
Method onHeartbeatMethod)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onHeartbeat(org.atmosphere.cpr.AtmosphereResourceEvent event) |
void |
onRequest(org.atmosphere.cpr.AtmosphereResource atmosphereResource) |
public StompSendActionAtmosphereHandler(Object toProxy, Method method, org.atmosphere.config.managed.Encoder<Object,String> encoder, org.atmosphere.config.managed.Decoder<String,?> decoder, org.atmosphere.cpr.Broadcaster broadcaster, Method onHeartbeatMethod)
Creates a new instance.
toProxy - the object to proxymethod - the method to invoke on proxy objectencoder - encodes into expected parameter typedecoder - converts returned type into String wrapped in text framebroadcaster - the broadcaster associated to the destination declared in the annotated methodonHeartbeatMethod - the heartbeat methodpublic void onRequest(org.atmosphere.cpr.AtmosphereResource atmosphereResource)
throws IOException
onRequest in interface org.atmosphere.cpr.AtmosphereHandlerIOExceptionpublic void onHeartbeat(org.atmosphere.cpr.AtmosphereResourceEvent event)
onHeartbeat in interface org.atmosphere.cpr.AtmosphereResourceHeartbeatEventListenerCopyright © 2015. All Rights Reserved.