This
AtmosphereInterceptor implementation automatically suspends the intercepted
AtmosphereResource and takes care of managing the response's state (flushing, resuming,
etc.) when a
org.atmosphere.runtime.Broadcaster#broadcast is invoked. When used,
org.atmosphere.runtime.AtmosphereHandler implementations no longer need to make calls to
AtmosphereResource#suspend.
If your application doesn't use
org.atmosphere.runtime.Broadcaster, this interceptor will not work and you need to programmatically
resume, flush, etc.
By default, intercepted
AtmosphereResource instances are suspended when a GET
request is received. You can change the triggering http method by configuring
org.atmosphere.runtime.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 (
org.atmosphere.runtime.AtmosphereHandler,
org.atmosphere.websocket.WebSocketHandler, or
org.atmosphere.runtime.Meteor instances) or extensions (GWT, Jersey, Wicket, etc...)
For this mechanism to work properly, each client must set the
org.atmosphere.runtime.HeaderConfig#X_ATMOSPHERE_TRANSPORT header. Your AtmosphereHandler must also extends the
org.atmosphere.handler.AbstractReflectorAtmosphereHandler or implements the logic defined inside
org.atmosphere.handler.AbstractReflectorAtmosphereHandler#postStateChange(org.atmosphere.runtime.AtmosphereResourceEvent)