|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.szegedi.spring.web.jsflow.support.FlowStateSerializer org.szegedi.spring.web.jsflow.HttpSessionFlowStateStorage
public class HttpSessionFlowStateStorage
An implementation for flow state storage that stores flow states in
the HttpSession
objects. As states are stored
privately to HTTP sessions, no crossover between sessions is possible
(requesting a state from a session it doesn't belong to won't work, and it
is also possible to have identical flowstate ids in two sessions without any
interference).
Nested Class Summary | |
---|---|
static interface |
HttpSessionFlowStateStorage.ContinuationCallback
Should be implemented by classes used as callbacks for forEachContinuation(HttpSession,
ContinuationCallback) |
Nested classes/interfaces inherited from class org.szegedi.spring.web.jsflow.support.FlowStateSerializer |
---|
FlowStateSerializer.StubProvider, FlowStateSerializer.StubResolver |
Constructor Summary | |
---|---|
HttpSessionFlowStateStorage()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
static void |
bindStubProvider(javax.servlet.http.HttpSession session,
FlowStateSerializer.StubProvider provider)
Binds a stub provider into the HttpSession. |
static void |
bindStubResolver(javax.servlet.http.HttpSession session,
FlowStateSerializer.StubResolver resolver)
Binds a stub resolver into the HttpSession. |
void |
forEachContinuation(javax.servlet.http.HttpSession session,
HttpSessionFlowStateStorage.ContinuationCallback callback)
Enumerates all the continuations bound to a particular HTTP session. |
org.mozilla.javascript.NativeContinuation |
getState(javax.servlet.http.HttpServletRequest request,
java.lang.String id)
Retrieves the state associated with a request |
void |
setFlowStateIdGenerator(FlowStateIdGenerator flowStateIdGenerator)
|
void |
setMaxStates(int maxStates)
Sets the maximum number of states per HTTP session that this manager will store. |
void |
setRandom(java.util.Random random)
Deprecated. use setFlowStateIdGenerator(FlowStateIdGenerator)
with a RandomFlowStateIdGenerator instead. |
java.lang.String |
storeState(javax.servlet.http.HttpServletRequest request,
org.mozilla.javascript.NativeContinuation state)
Stores the state associated with the current request |
Methods inherited from class org.szegedi.spring.web.jsflow.support.FlowStateSerializer |
---|
deserializeContinuation, getScriptStorage, serializeContinuation, setApplicationContext, setScriptStorage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpSessionFlowStateStorage()
Method Detail |
---|
public void setMaxStates(int maxStates)
maxStates
- public void setRandom(java.util.Random random)
setFlowStateIdGenerator(FlowStateIdGenerator)
with a RandomFlowStateIdGenerator
instead.
SecureRandom
.
random
- public void setFlowStateIdGenerator(FlowStateIdGenerator flowStateIdGenerator)
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class FlowStateSerializer
java.lang.Exception
public static void bindStubProvider(javax.servlet.http.HttpSession session, FlowStateSerializer.StubProvider provider)
session
- the HttpSession to bind the provider intoprovider
- the providerpublic static void bindStubResolver(javax.servlet.http.HttpSession session, FlowStateSerializer.StubResolver resolver)
session
- the HttpSession to bind the resolver intoresolver
- the resolverpublic java.lang.String storeState(javax.servlet.http.HttpServletRequest request, org.mozilla.javascript.NativeContinuation state)
FlowStateStorage
storeState
in interface FlowStateStorage
request
- the HTTP requeststate
- the state
public org.mozilla.javascript.NativeContinuation getState(javax.servlet.http.HttpServletRequest request, java.lang.String id)
FlowStateStorage
getState
in interface FlowStateStorage
request
- the HTTP requestid
- the unique identifier for the flow state
public void forEachContinuation(javax.servlet.http.HttpSession session, HttpSessionFlowStateStorage.ContinuationCallback callback)
session
- the http sessioncallback
- a callback that will be invoked for each continuation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |