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, ShiroInterceptor, SSEAtmosphereInterceptor, SuspendTrackerInterceptor, TrackMessageSizeB64Interceptor, TrackMessageSizeInterceptor, WebSocketMessageSuspendInterceptor

public interface AtmosphereInterceptor
extends AtmosphereConfigAware

Intercept the dispatch of AtmosphereResource before they get dispatched to AtmosphereHandlers. An implementation of this class can intercept the dispatch and modify the AtmosphereResource and its associated AtmosphereRequest and AtmosphereResponse.

This class can be used to implement custom protocols like Server-Sent Events, Socket.IO, etc.

Author:
Jeanfrancois Arcand

Method Summary
 void destroy()
          Clean the AtmosphereInterceptor when removed or when the Atmosphere is undeployed.
 Action inspect(AtmosphereResource r)
          Invoked before an AtmosphereResource gets dispatched to AtmosphereHandler.
 void postInspect(AtmosphereResource r)
          Invoked after an AtmosphereResource gets dispatched to AtmosphereHandler.
 
Methods inherited from interface org.atmosphere.inject.AtmosphereConfigAware
configure
 

Method Detail

inspect

Action inspect(AtmosphereResource r)
Invoked before an AtmosphereResource gets dispatched to AtmosphereHandler.

Parameters:
r - a AtmosphereResource
Returns:
Action.CONTINUE or Action.SUSPEND to dispatch the AtmosphereResource to other AtmosphereInterceptor or AtmosphereHandler. Return Action.TYPE.CANCELLED to stop the processing.

postInspect

void postInspect(AtmosphereResource r)
Invoked after an AtmosphereResource gets dispatched to AtmosphereHandler.

Parameters:
r - a AtmosphereResource

destroy

void destroy()
Clean the AtmosphereInterceptor when removed or when the Atmosphere is undeployed.



Copyright © 2015. All Rights Reserved.