Package org.atmosphere.cpr
Interface AtmosphereInterceptor
-
- All Superinterfaces:
AtmosphereConfigAware
- All Known Implementing Classes:
AndroidAtmosphereInterceptor,AtmosphereHandlerServiceInterceptor,AtmosphereInterceptorAdapter,AtmosphereResourceLifecycleInterceptor,AtmosphereResourceStateRecovery,BroadcastOnPostAtmosphereInterceptor,CacheHeadersInterceptor,CorsInterceptor,HeartbeatInterceptor,IdleResourceInterceptor,JavaScriptProtocol,JSONPAtmosphereInterceptor,ManagedServiceInterceptor,MeteorServiceInterceptor,NginxInterceptor,OldBrowserPaddingInterceptor,OnDisconnectInterceptor,PaddingAtmosphereInterceptor,ServiceInterceptor,SessionCreationInterceptor,SimpleRestInterceptor,SSEAtmosphereInterceptor,SuspendTrackerInterceptor,TrackMessageSizeB64Interceptor,TrackMessageSizeInterceptor,WebSocketMessageSuspendInterceptor
public interface AtmosphereInterceptor extends AtmosphereConfigAware
Intercept the dispatch ofAtmosphereResourcebefore they get dispatched toAtmosphereHandlers. An implementation of this class can intercept the dispatch and modify the AtmosphereResource and its associatedAtmosphereRequestandAtmosphereResponse. This class can be used to implement custom protocols like Server-Sent Events, Socket.IO, etc.- Author:
- Jeanfrancois Arcand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Clean the AtmosphereInterceptor when removed or when the Atmosphere is undeployed.Actioninspect(AtmosphereResource r)Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.voidpostInspect(AtmosphereResource r)Invoked after anAtmosphereResourcegets dispatched toAtmosphereHandler.-
Methods inherited from interface org.atmosphere.inject.AtmosphereConfigAware
configure
-
-
-
-
Method Detail
-
inspect
Action inspect(AtmosphereResource r)
Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.- Parameters:
r- aAtmosphereResource- Returns:
Action.CONTINUEorAction.SUSPENDto dispatch theAtmosphereResourceto otherAtmosphereInterceptororAtmosphereHandler. ReturnAction.TYPE.CANCELLEDto stop the processing.
-
postInspect
void postInspect(AtmosphereResource r)
Invoked after anAtmosphereResourcegets dispatched toAtmosphereHandler.- Parameters:
r- aAtmosphereResource
-
destroy
void destroy()
Clean the AtmosphereInterceptor when removed or when the Atmosphere is undeployed.
-
-