Package org.atmosphere.interceptor
Class JavaScriptProtocol
java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.interceptor.JavaScriptProtocol
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
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.
- Author:
- Jeanfrancois Arcand
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.atmosphere.interceptor.InvokationOrder
InvokationOrder.PRIORITY -
Field Summary
Fields inherited from interface org.atmosphere.interceptor.InvokationOrder
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(AtmosphereConfig config) Configure an AtmosphereFramework object.booleanenforceAtmosphereVersion(boolean enforceAtmosphereVersion) Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.toString()wsDelimiter(String wsDelimiter) Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
destroy, postInspect, priority
-
Constructor Details
-
JavaScriptProtocol
public JavaScriptProtocol()
-
-
Method Details
-
configure
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Overrides:
configurein classAtmosphereInterceptorAdapter- Parameters:
config-AtmosphereConfig
-
inspect
Description copied from interface:AtmosphereInterceptorInvoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.- Specified by:
inspectin interfaceAtmosphereInterceptor- Overrides:
inspectin classAtmosphereInterceptorAdapter- Parameters:
ar- aAtmosphereResource- Returns:
Action.CONTINUEorAction.SUSPENDto dispatch theAtmosphereResourceto otherAtmosphereInterceptororAtmosphereHandler. ReturnAction.TYPE.CANCELLEDto stop the processing.
-
wsDelimiter
-
wsDelimiter
-
enforceAtmosphereVersion
public boolean enforceAtmosphereVersion() -
enforceAtmosphereVersion
-
toString
- Overrides:
toStringin classAtmosphereInterceptorAdapter
-