public class JavaScriptProtocol extends AtmosphereInterceptorAdapter
An Interceptor that send back to a websocket and http client the value of HeaderConfig.X_ATMOSPHERE_TRACKING_ID
.
Moreover, if any HeartbeatInterceptor
is installed, it provides the configured heartbeat interval in seconds
and the value to be sent for each heartbeat by the client. If not interceptor is installed, then "0" is sent to tell
he client to not send any heartbeat.
InvokationOrder.PRIORITY
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT
Constructor and Description |
---|
JavaScriptProtocol() |
Modifier and Type | Method and Description |
---|---|
void |
configure(AtmosphereConfig config)
Configure an AtmosphereFramework object.
|
boolean |
enforceAtmosphereVersion() |
JavaScriptProtocol |
enforceAtmosphereVersion(boolean enforceAtmosphereVersion) |
Action |
inspect(AtmosphereResource ar)
Invoked before an
AtmosphereResource gets dispatched to AtmosphereHandler . |
String |
toString() |
String |
wsDelimiter() |
JavaScriptProtocol |
wsDelimiter(String wsDelimiter) |
destroy, postInspect, priority
public void configure(AtmosphereConfig config)
AtmosphereConfigAware
configure
in interface AtmosphereConfigAware
configure
in class AtmosphereInterceptorAdapter
config
- AtmosphereConfig
public Action inspect(AtmosphereResource ar)
AtmosphereInterceptor
AtmosphereResource
gets dispatched to AtmosphereHandler
.inspect
in interface AtmosphereInterceptor
inspect
in class AtmosphereInterceptorAdapter
ar
- a AtmosphereResource
Action.CONTINUE
or Action.SUSPEND
to dispatch the AtmosphereResource
to other AtmosphereInterceptor
or AtmosphereHandler
.
Return Action.TYPE.CANCELLED
to stop the processing.public String wsDelimiter()
public JavaScriptProtocol wsDelimiter(String wsDelimiter)
public boolean enforceAtmosphereVersion()
public JavaScriptProtocol enforceAtmosphereVersion(boolean enforceAtmosphereVersion)
public String toString()
toString
in class AtmosphereInterceptorAdapter
Copyright © 2016. All rights reserved.