Package org.atmosphere.interceptor
Class SuspendTrackerInterceptor
- java.lang.Object
-
- org.atmosphere.cpr.AtmosphereInterceptorAdapter
-
- org.atmosphere.interceptor.SuspendTrackerInterceptor
-
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
public class SuspendTrackerInterceptor extends AtmosphereInterceptorAdapter
An interceptor that keep track ofAtmosphereResource.uuid()and disable invocation ofAtmosphereResourceEventListenerAdapter.onSuspend(org.atmosphere.cpr.AtmosphereResourceEvent)andAtmosphereResourceEventListenerAdapter.onPreSuspend(org.atmosphere.cpr.AtmosphereResourceEvent)When used, the onSuspend will be only called ONCE for every transport, when the first request is made.- Author:
- Jeanfrancois Arcand
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.atmosphere.interceptor.InvokationOrder
InvokationOrder.PRIORITY
-
-
Field Summary
-
Fields inherited from interface org.atmosphere.interceptor.InvokationOrder
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description SuspendTrackerInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Actioninspect(AtmosphereResource r)Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.InvokationOrder.PRIORITYpriority()Return the priority an AtmosphereInterceptor must be executed.java.lang.StringtoString()java.util.Set<java.lang.String>trackedUUID()-
Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
configure, destroy, postInspect
-
-
-
-
Method Detail
-
inspect
public Action inspect(AtmosphereResource r)
Description copied from interface:AtmosphereInterceptorInvoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.- Specified by:
inspectin interfaceAtmosphereInterceptor- Overrides:
inspectin classAtmosphereInterceptorAdapter- Parameters:
r- aAtmosphereResource- Returns:
Action.CONTINUEorAction.SUSPENDto dispatch theAtmosphereResourceto otherAtmosphereInterceptororAtmosphereHandler. ReturnAction.TYPE.CANCELLEDto stop the processing.
-
trackedUUID
public java.util.Set<java.lang.String> trackedUUID()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAtmosphereInterceptorAdapter
-
priority
public InvokationOrder.PRIORITY priority()
Description copied from interface:InvokationOrderReturn the priority an AtmosphereInterceptor must be executed.- Specified by:
priorityin interfaceInvokationOrder- Overrides:
priorityin classAtmosphereInterceptorAdapter- Returns:
- PRIORITY
-
-