|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.clientcontroller.Transition
A collection of transitions are specified by each state and driven by the state machine. A transition will handle an event if its guard conditions are met. The transition action leads to a new state.
All deriving transition implementations should have a section of javadoc in the class heading based on the following:
Constructor Summary | |
Transition()
Constructs a Transition object. |
Method Summary | |
abstract State |
doAction(Map arguments,
StateContext context)
Complete any action for the transition and specify a resulting State . |
protected Object |
getExpectedValueFromArguments(Map arguments,
String aKey)
Helper method to retrieve an expected value from the argument list. |
abstract String |
getExternalEvent()
Retrieves the name of the external event which this transition reacts to. |
protected Object |
getValueFromArguments(Map arguments,
String aKey)
Helper method to retrieve a value from the argument list. |
protected boolean |
isExternal()
Allow the state machine to know if this is an external/internal transition. |
abstract boolean |
isGuardConditionMet(StateContext context)
Checks guard conditions for this transition. |
protected void |
setAsInternal()
Specify that this is an internal transition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Transition()
Transition
object.
Method Detail |
protected void setAsInternal()
protected boolean isExternal()
public abstract String getExternalEvent()
Transition
will match all events. Note that the
guard condition will still be checked and the priority order for
registered Transition
s is sill valid.
public abstract boolean isGuardConditionMet(StateContext context)
true
if conditions are met, otherwise false
.public abstract State doAction(Map arguments, StateContext context) throws StateMachineException
State
.
arguments
- a list of arguments for the event handler, may be null.
State
.
StateMachineException
- if there is a system related problem processing the request. This might
be a missing key-value, application server problems, failed domain
validation, or data access errors.protected Object getExpectedValueFromArguments(Map arguments, String aKey) throws ValueNotFoundException
ValueNotFoundException
- if the expected key-value is not found in the arguments
.protected Object getValueFromArguments(Map arguments, String aKey) throws ValueNotFoundException
null
.
ValueNotFoundException
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |