S - the type of stateE - the type of eventpublic class StateMachineState<S,E> extends AbstractState<S,E>
State implementation where state is wrapped in a substatemachine.| Constructor and Description |
|---|
StateMachineState(S id,
StateMachine<S,E> submachine)
Instantiates a new state machine state.
|
StateMachineState(S id,
StateMachine<S,E> submachine,
java.util.Collection<E> deferred)
Instantiates a new state machine state.
|
StateMachineState(S id,
StateMachine<S,E> submachine,
java.util.Collection<E> deferred,
java.util.Collection<? extends Action<S,E>> entryActions,
java.util.Collection<? extends Action<S,E>> exitActions)
Instantiates a new state machine state.
|
StateMachineState(S id,
StateMachine<S,E> submachine,
java.util.Collection<E> deferred,
java.util.Collection<? extends Action<S,E>> entryActions,
java.util.Collection<? extends Action<S,E>> exitActions,
PseudoState<S,E> pseudoState)
Instantiates a new state machine state.
|
StateMachineState(S id,
StateMachine<S,E> submachine,
PseudoState<S,E> pseudoState)
Instantiates a new state machine state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
entry(StateContext<S,E> context)
Initiate an entry sequence for the state.
|
void |
exit(StateContext<S,E> context)
Initiate an exit sequence for the state.
|
java.util.Collection<S> |
getIds()
Gets the state identifiers.
|
java.util.Collection<State<S,E>> |
getStates()
Gets all possible states this state knows about including itself
and substates.
|
boolean |
sendEvent(org.springframework.messaging.Message<E> event)
Send an event
E wrapped with a Message to the state. |
boolean |
shouldDefer(org.springframework.messaging.Message<E> event)
Checks if state wants to defer an event.
|
java.lang.String |
toString() |
addActionListener, addStateListener, armTriggers, cancelStateActions, disarmTriggers, doStart, doStop, executeAction, getDeferredEvents, getEntryActions, getExitActions, getId, getPseudoState, getRegions, getStateActions, getSubmachine, getTriggers, isComposite, isOrthogonal, isSimple, isSubmachineState, notifyStateOnComplete, removeActionListener, removeStateListener, scheduleAction, scheduleStateActions, setStateDoActionPolicy, setStateDoActionPolicyTimeout, setTriggersafterPropertiesSet, destroy, doDestroy, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, start, stop, stoppublic StateMachineState(S id, StateMachine<S,E> submachine)
id - the state identifiersubmachine - the submachinepublic StateMachineState(S id, StateMachine<S,E> submachine, java.util.Collection<E> deferred)
id - the state identifiersubmachine - the submachinedeferred - the deferredpublic StateMachineState(S id, StateMachine<S,E> submachine, PseudoState<S,E> pseudoState)
id - the state identifiersubmachine - the submachinepseudoState - the pseudo statepublic StateMachineState(S id, StateMachine<S,E> submachine, java.util.Collection<E> deferred, java.util.Collection<? extends Action<S,E>> entryActions, java.util.Collection<? extends Action<S,E>> exitActions, PseudoState<S,E> pseudoState)
id - the state identifiersubmachine - the submachinedeferred - the deferredentryActions - the entry actionsexitActions - the exit actionspseudoState - the pseudo statepublic StateMachineState(S id, StateMachine<S,E> submachine, java.util.Collection<E> deferred, java.util.Collection<? extends Action<S,E>> entryActions, java.util.Collection<? extends Action<S,E>> exitActions)
id - the state identifiersubmachine - the submachinedeferred - the deferredentryActions - the entry actionsexitActions - the exit actionspublic java.util.Collection<S> getIds()
Statepublic java.util.Collection<State<S,E>> getStates()
Statepublic void exit(StateContext<S,E> context)
Statepublic void entry(StateContext<S,E> context)
Statepublic boolean sendEvent(org.springframework.messaging.Message<E> event)
StateE wrapped with a Message to the state.public boolean shouldDefer(org.springframework.messaging.Message<E> event)
StateshouldDefer in interface State<S,E>shouldDefer in class AbstractState<S,E>event - the wrapped eventpublic java.lang.String toString()
toString in class AbstractState<S,E>