Package org.atmosphere.client
Class TrackMessageSizeInterceptor
java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.client.TrackMessageSizeInterceptor
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
An
AtmosphereInterceptor that add a message size and delimiter.
The special String is configurable using ApplicationConfig.MESSAGE_DELIMITER and
you can configure this class to exclude some response's content-type by using the ApplicationConfig.EXCLUDED_CONTENT_TYPES- Author:
- Jeanfrancois Arcand
-
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) Exclude response's content-type from being processed by this class.Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.messageDelimiter(String endString) Set the character delimiter used by this class to separate message.priority()Return the priority an AtmosphereInterceptor must be executed.toString()Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
destroy, postInspect
-
Field Details
-
SKIP_INTERCEPTOR
-
-
Constructor Details
-
TrackMessageSizeInterceptor
public TrackMessageSizeInterceptor()
-
-
Method Details
-
configure
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Overrides:
configurein classAtmosphereInterceptorAdapter- Parameters:
config-AtmosphereConfig
-
messageDelimiter
Set the character delimiter used by this class to separate message.- Returns:
- this
-
excludedContentType
Exclude response's content-type from being processed by this class.- Parameters:
excludedContentType- the value ofAtmosphereResponseImpl.getContentType()- Returns:
- this
-
excludedContentTypes
-
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
-
priority
Description copied from interface:InvokationOrderReturn the priority an AtmosphereInterceptor must be executed.- Specified by:
priorityin interfaceInvokationOrder- Overrides:
priorityin classAtmosphereInterceptorAdapter- Returns:
- PRIORITY
-