S
- the type of stateE
- the type of eventpublic class RegionState<S,E> extends AbstractState<S,E>
State
implementation where states are wrapped in a regions..Constructor and Description |
---|
RegionState(S id,
java.util.Collection<Region<S,E>> regions)
Instantiates a new region state.
|
RegionState(S id,
java.util.Collection<Region<S,E>> regions,
java.util.Collection<E> deferred)
Instantiates a new region state.
|
RegionState(S id,
java.util.Collection<Region<S,E>> regions,
java.util.Collection<E> deferred,
java.util.Collection<? extends Action<S,E>> entryActions,
java.util.Collection<? extends Action<S,E>> exitActions)
Instantiates a new region state.
|
RegionState(S id,
java.util.Collection<Region<S,E>> regions,
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 region state.
|
RegionState(S id,
java.util.Collection<Region<S,E>> regions,
PseudoState<S,E> pseudoState)
Instantiates a new region 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, setTriggers
afterPropertiesSet, destroy, doDestroy, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, start, stop, stop
public RegionState(S id, java.util.Collection<Region<S,E>> regions)
id
- the state identifierregions
- the regionspublic RegionState(S id, java.util.Collection<Region<S,E>> regions, java.util.Collection<E> deferred)
id
- the state identifierregions
- the regionsdeferred
- the deferredpublic RegionState(S id, java.util.Collection<Region<S,E>> regions, PseudoState<S,E> pseudoState)
id
- the state identifierregions
- the regionspseudoState
- the pseudo statepublic RegionState(S id, java.util.Collection<Region<S,E>> regions, 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 identifierregions
- the regionsdeferred
- the deferredentryActions
- the entry actionsexitActions
- the exit actionspseudoState
- the pseudo statepublic RegionState(S id, java.util.Collection<Region<S,E>> regions, java.util.Collection<E> deferred, java.util.Collection<? extends Action<S,E>> entryActions, java.util.Collection<? extends Action<S,E>> exitActions)
id
- the state identifierregions
- the regionsdeferred
- the deferredentryActions
- the entry actionsexitActions
- the exit actionspublic boolean sendEvent(org.springframework.messaging.Message<E> event)
State
E
wrapped with a Message
to the state.public boolean shouldDefer(org.springframework.messaging.Message<E> event)
State
shouldDefer
in interface State<S,E>
shouldDefer
in class AbstractState<S,E>
event
- the wrapped eventpublic void exit(StateContext<S,E> context)
State
public void entry(StateContext<S,E> context)
State
public java.util.Collection<S> getIds()
State
public java.util.Collection<State<S,E>> getStates()
State
public java.lang.String toString()
toString
in class AbstractState<S,E>