Package org.atmosphere.interceptor
Class CacheHeadersInterceptor
java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.interceptor.CacheHeadersInterceptor
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
At interceptor for customizing the following headers: Expire, Cache-Control, Pragma,
Access-Control-Origin and Access-Control-Allow-Credential.
- 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.booleaninjectCacheHeaders(boolean injectCacheHeaders) Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.toString()booleanwriteHeaders(boolean writeHeaders) Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
destroy, postInspect, priority
-
Constructor Details
-
CacheHeadersInterceptor
public CacheHeadersInterceptor()
-
-
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:
r- aAtmosphereResource- Returns:
Action.CONTINUEorAction.SUSPENDto dispatch theAtmosphereResourceto otherAtmosphereInterceptororAtmosphereHandler. ReturnAction.TYPE.CANCELLEDto stop the processing.
-
injectCacheHeaders
public boolean injectCacheHeaders() -
writeHeaders
public boolean writeHeaders() -
injectCacheHeaders
-
writeHeaders
-
toString
- Overrides:
toStringin classAtmosphereInterceptorAdapter
-