public class StompInterceptor
extends org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor
This interceptor reads the messages and parse it thanks to the Parser. When
the message is parsed, the interceptor invokes a method provided by an AtmosphereInterceptorAdapter according
to the Action specified inside the message.
This interceptor inherits from the AtmosphereResourceLifecycleInterceptor to suspends the connection. Then it
could add any AtmosphereResource to a Broadcaster if necessary.
This interceptor expects by default that all messages respect the STOMP protocol. It could be fault tolerant for
messages not respecting STOMP by setting the IGNORE_ERROR setting in atmosphere.xml or web.xml file.
By default the interceptor uses by default AtmosphereStompAdapterImpl to delegate the frame processing. User
can set its own implementation by specifying the class name in StompInterceptor.PropertyClass.ADAPTER_CLASS setting in
atmosphere.xml or web.xml file.
| Modifier and Type | Class and Description |
|---|---|
static class |
StompInterceptor.PropertyClass
This enum is dedicated to properties that represents a class to instantiate.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
IGNORE_ERROR
Setting that specifies if the interceptor ignores messages that don't respect STOMP protocol.
|
static String |
STOMP_MESSAGE_BODY
The attribute name this interceptor uses to inject a parsed body in the request when it is extracted from the frame.
|
| Constructor and Description |
|---|
StompInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.atmosphere.cpr.AtmosphereConfig config) |
org.atmosphere.cpr.Action |
inspect(org.atmosphere.cpr.AtmosphereResource r) |
void |
postInspect(org.atmosphere.cpr.AtmosphereResource atmosphereResource) |
public static final String IGNORE_ERROR
public static final String STOMP_MESSAGE_BODY
public void configure(org.atmosphere.cpr.AtmosphereConfig config)
configure in interface org.atmosphere.cpr.AtmosphereInterceptorconfigure in class org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptorpublic org.atmosphere.cpr.Action inspect(org.atmosphere.cpr.AtmosphereResource r)
inspect in interface org.atmosphere.cpr.AtmosphereInterceptorinspect in class org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptorpublic void postInspect(org.atmosphere.cpr.AtmosphereResource atmosphereResource)
postInspect in interface org.atmosphere.cpr.AtmosphereInterceptorpostInspect in class org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptorCopyright © 2014. All Rights Reserved.