This {@link AtmosphereInterceptor} implementation automatically suspends the intercepted{@link AtmosphereResource} and takes care of managing the response's state (flushing, resuming,etc.) when a {@link org.atmosphere.cpr.Broadcaster#broadcast} is invoked. When used, {@link org.atmosphere.cpr.AtmosphereHandler} implementations no longer need to make calls to{@link AtmosphereResource#suspend}.
If your application doesn't use {@link org.atmosphere.cpr.Broadcaster}, this interceptor will not work and you need to programmatically resume, flush, etc.
By default, intercepted {@link AtmosphereResource} instances are suspended when a GETrequest is received. You can change the triggering http method by configuring {@link org.atmosphere.cpr.ApplicationConfig#ATMOSPHERERESOURCE_INTERCEPTOR_METHOD}
Use this class when you don't want to manage the suspend/resume operation from your particular Atmosphere framework implementation classes ( {@link org.atmosphere.cpr.AtmosphereHandler}, {@link org.atmosphere.websocket.WebSocketHandler}, or {@link org.atmosphere.cpr.Meteor} instances) or extensions (GWT, Jersey, Wicket, etc...)
For this mechanism to work properly, each client must set the {@link org.atmosphere.cpr.HeaderConfig#X_ATMOSPHERE_TRANSPORT} header. Your AtmosphereHandler must also extends the{@link org.atmosphere.handler.AbstractReflectorAtmosphereHandler} or implements the logic defined inside{@link org.atmosphere.handler.AbstractReflectorAtmosphereHandler#postStateChange(org.atmosphere.cpr.AtmosphereResourceEvent)}
@author Jeanfrancois Arcand