|
||||||||||
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.RandomFlowStateIdGenerator
public class RandomFlowStateIdGenerator
Default implementation of flow state id generator that uses a random number generator.
Constructor Summary | |
---|---|
RandomFlowStateIdGenerator()
|
Method Summary | |
---|---|
boolean |
dependsOnContinuation()
Returns true if the return value of FlowStateIdGenerator.generateStateId(NativeContinuation)
depends on the passed state (that is, for a given state object, it will
always return the same ID). |
java.lang.Long |
generateStateId(org.mozilla.javascript.NativeContinuation c)
Generate the flow state id for the specified state. |
void |
setRandom(java.util.Random random)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomFlowStateIdGenerator()
Method Detail |
---|
public void setRandom(java.util.Random random)
public java.lang.Long generateStateId(org.mozilla.javascript.NativeContinuation c)
FlowStateIdGenerator
generateStateId
in interface FlowStateIdGenerator
public boolean dependsOnContinuation()
FlowStateIdGenerator
FlowStateIdGenerator.generateStateId(NativeContinuation)
depends on the passed state (that is, for a given state object, it will
always return the same ID). Implementations of the interface that
implement counters or random generators will return false.
Implementations that use some information contained in the continuation
will return true. If an implementation returns true, then returning an
ID equal to an existing state's ID might cause the user of the class to
overwrite the existing ID. If an implementation returns false, the user
of the class is encouraged to invoke the
FlowStateIdGenerator.generateStateId(NativeContinuation)
method repeatedly until it
receives a non-conflicting ID.
dependsOnContinuation
in interface FlowStateIdGenerator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |