org.atmosphere.cpr
Interface AtmosphereInterceptor

All Known Implementing Classes:
AndroidAtmosphereInterceptor, AtmosphereInterceptorAdapter, AtmosphereResourceLifecycleInterceptor, BroadcastOnPostAtmosphereInterceptor, JavaScriptProtocol, JSONPAtmosphereInterceptor, MessageLengthInterceptor, OnDisconnectInterceptor, SessionCreationInterceptor, SSEAtmosphereInterceptor, TrackMessageSizeInterceptor

public interface AtmosphereInterceptor

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 it's associated AtmosphereRequest and AtmosphereResponse

This class can be used to implement custom protocol like Server Side Events, Socket.IO, etc.

Author:
Jeanfrancois Arcand

Method Summary
 void configure(AtmosphereConfig config)
          Allow this object to configure it's state when initialized
 Action inspect(AtmosphereResource r)
          Invoked before an AtmosphereResource gets dispatched to AtmosphereHandler
 void postInspect(AtmosphereResource r)
          Invoked after an AtmosphereResource gets dispatched to AtmosphereHandler
 

Method Detail

configure

void configure(AtmosphereConfig config)
Allow this object to configure it's state when initialized

Parameters:
config - an AtmosphereConfig

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


Copyright © 2013. All Rights Reserved.