Package org.atmosphere.interceptor
Class SessionCreationInterceptor
- java.lang.Object
-
- org.atmosphere.cpr.AtmosphereInterceptorAdapter
-
- org.atmosphere.interceptor.SessionCreationInterceptor
-
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
public class SessionCreationInterceptor extends AtmosphereInterceptorAdapter
An interceptor that create anHttpSessionon the fist received request so transport like long-polling can share the session with request coming after the suspend operation. Without this and because with long-polling cookies aren't read by the browser until the response is resumed, the session id will not be the same so session couldn't be used.- 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 SessionCreationInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Actioninspect(AtmosphereResource r)Invoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.-
Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
configure, destroy, postInspect, priority, toString
-
-
-
-
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.
-
-