public interface AtmosphereInterceptor extends AtmosphereConfigAware
AtmosphereResource
before they get dispatched to AtmosphereHandler
s.
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.Modifier and Type | Method and Description |
---|---|
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 . |
configure
Action inspect(AtmosphereResource r)
AtmosphereResource
gets dispatched to AtmosphereHandler
.r
- a AtmosphereResource
Action.CONTINUE
or Action.SUSPEND
to dispatch the AtmosphereResource
to other AtmosphereInterceptor
or AtmosphereHandler
.
Return Action.TYPE.CANCELLED
to stop the processing.void postInspect(AtmosphereResource r)
AtmosphereResource
gets dispatched to AtmosphereHandler
.r
- a AtmosphereResource
void destroy()
Copyright © 2016. All rights reserved.