Package org.atmosphere.interceptor
Class TrackMessageSizeB64Interceptor
- java.lang.Object
-
- org.atmosphere.cpr.AtmosphereInterceptorAdapter
-
- org.atmosphere.interceptor.TrackMessageSizeB64Interceptor
-
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
public class TrackMessageSizeB64Interceptor extends AtmosphereInterceptorAdapter
AnAtmosphereInterceptorthat 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 theApplicationConfig.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
Fields Modifier and Type Field Description static java.lang.StringSKIP_INTERCEPTOR-
Fields inherited from interface org.atmosphere.interceptor.InvokationOrder
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description TrackMessageSizeB64Interceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(AtmosphereConfig config)Configure an AtmosphereFramework object.TrackMessageSizeB64InterceptorexcludedContentType(java.lang.String excludedContentType)Excluse response's content-type from being processed by this class.Actioninspect(AtmosphereResource r)Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.java.lang.StringtoString()-
Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
destroy, postInspect, priority
-
-
-
-
Method Detail
-
configure
public void configure(AtmosphereConfig config)
Description copied from interface:AtmosphereConfigAwareConfigure an AtmosphereFramework object.- Specified by:
configurein interfaceAtmosphereConfigAware- Overrides:
configurein classAtmosphereInterceptorAdapter- Parameters:
config-AtmosphereConfig
-
excludedContentType
public TrackMessageSizeB64Interceptor excludedContentType(java.lang.String excludedContentType)
Excluse response's content-type from being processed by this class.- Parameters:
excludedContentType- the value ofAtmosphereResponseImpl.getContentType()- Returns:
- this
-
inspect
public Action inspect(AtmosphereResource r)
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
public java.lang.String toString()
- Overrides:
toStringin classAtmosphereInterceptorAdapter
-
-