Package org.atmosphere.interceptor
Class TrackMessageSizeB64Interceptor
java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.interceptor.TrackMessageSizeB64Interceptor
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
An
AtmosphereInterceptor that adds message size and delimiter, and encodes the message in Base64.
This allows for broadcasting of messages containing the delimiter character.
You can configure this class to exclude some response's content-type by using the ApplicationConfig.EXCLUDED_CONTENT_TYPES- Author:
- Jeanfrancois Arcand, Martin Mačura
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.atmosphere.interceptor.InvokationOrder
InvokationOrder.PRIORITY -
Field Summary
FieldsFields 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.excludedContentType(String excludedContentType) Excluse response's content-type from being processed by this class.Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.booleanisMessageAlreadyEncoded(String message) toString()Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
destroy, postInspect, priority
-
Field Details
-
SKIP_INTERCEPTOR
-
-
Constructor Details
-
TrackMessageSizeB64Interceptor
public TrackMessageSizeB64Interceptor()
-
-
Method Details
-
configure
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Overrides:
configurein classAtmosphereInterceptorAdapter- Parameters:
config-AtmosphereConfig
-
excludedContentType
Excluse response's content-type from being processed by this class.- Parameters:
excludedContentType- the value ofAtmosphereResponseImpl.getContentType()- Returns:
- this
-
inspect
Description copied from interface:AtmosphereInterceptorInvoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.- Specified by:
inspectin interfaceAtmosphereInterceptor- Overrides:
inspectin classAtmosphereInterceptorAdapter- Parameters:
r- aAtmosphereResource- Returns:
Action.CONTINUEorAction.SUSPENDto dispatch theAtmosphereResourceto otherAtmosphereInterceptororAtmosphereHandler. ReturnAction.TYPE.CANCELLEDto stop the processing.
-
toString
- Overrides:
toStringin classAtmosphereInterceptorAdapter
-
isMessageAlreadyEncoded
-