public class FrameInterceptor extends org.atmosphere.cpr.AtmosphereInterceptorAdapter implements StompInterceptor
This interceptor reads the frames and parse it thanks to the StompFormat. When
the message is parsed, the interceptor delegates an appropriate treatment to a StompInterceptor.
This interceptor should be executed before the AtmosphereResourceLifecycleInterceptor
to suspends the connection. Then it could add any AtmosphereResource to a Broadcaster if necessary.
| Modifier and Type | Class and Description |
|---|---|
static class |
FrameInterceptor.PropertyClass
This enum is dedicated to properties that represents a class to instantiate.
|
class |
FrameInterceptor.StompAtmosphereResource
Inner class that wraps the
AtmosphereResource during inspection to write frame and check the nature of
the operations. |
| Modifier and Type | Field and Description |
|---|---|
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 |
|---|
FrameInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.atmosphere.cpr.AtmosphereConfig config) |
org.atmosphere.cpr.Action |
inspect(org.atmosphere.cpr.AtmosphereFramework framework,
Frame frame,
FrameInterceptor.StompAtmosphereResource r)
Inspects the
AtmosphereResource with its extracted Frame. |
org.atmosphere.cpr.Action |
inspect(org.atmosphere.cpr.AtmosphereResource r) |
void |
postInspect(org.atmosphere.cpr.AtmosphereResource atmosphereResource) |
void |
setStompFormat(StompFormat stompFormat)
Sets the
StompFormat that wire frames. |
destroy, priority, toStringpublic static final String STOMP_MESSAGE_BODY
public void configure(org.atmosphere.cpr.AtmosphereConfig config)
configure in interface org.atmosphere.inject.AtmosphereConfigAwareconfigure in class org.atmosphere.cpr.AtmosphereInterceptorAdapterpublic org.atmosphere.cpr.Action inspect(org.atmosphere.cpr.AtmosphereResource r)
inspect in interface org.atmosphere.cpr.AtmosphereInterceptorinspect in class org.atmosphere.cpr.AtmosphereInterceptorAdapterpublic void postInspect(org.atmosphere.cpr.AtmosphereResource atmosphereResource)
postInspect in interface org.atmosphere.cpr.AtmosphereInterceptorpostInspect in class org.atmosphere.cpr.AtmosphereInterceptorAdapterpublic org.atmosphere.cpr.Action inspect(org.atmosphere.cpr.AtmosphereFramework framework,
Frame frame,
FrameInterceptor.StompAtmosphereResource r)
throws IOException
Inspects the AtmosphereResource with its extracted Frame.
inspect in interface StompInterceptorframework - the frameworkframe - the framer - the resourceIOException - if inspection failspublic void setStompFormat(StompFormat stompFormat)
Sets the StompFormat that wire frames.
stompFormat - the new formatterCopyright © 2015. All Rights Reserved.