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<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> entryActions,
java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> exitActions)
Instantiates a new state machine state.
|
StateMachineState(S id,
StateMachine<S,E> submachine,
java.util.Collection<E> deferred,
java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> entryActions,
java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> 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 |
|---|---|
reactor.core.publisher.Mono<java.lang.Void> |
entry(StateContext<S,E> context)
Initiate an entry sequence for the state.
|
reactor.core.publisher.Mono<java.lang.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.
|
reactor.core.publisher.Flux<StateMachineEventResult<S,E>> |
sendEvent(org.springframework.messaging.Message<E> event)
Send an event
E wrapped with a Message to the state and
return a StateMachineEventResult for results. |
boolean |
shouldDefer(org.springframework.messaging.Message<E> event)
Checks if state wants to defer an event.
|
java.lang.String |
toString() |
addActionListener, addStateListener, armTriggers, disarmTriggers, doPreStartReactively, doPreStopReactively, executeAction, getDeferredEvents, getEntryActions, getExitActions, getId, getPseudoState, getRegions, getStateActions, getSubmachine, getTriggers, handleStateDoOnComplete, isComposite, isOrthogonal, isSimple, isSubmachineState, notifyStateOnComplete, removeActionListener, removeStateListener, setStateDoActionPolicy, setStateDoActionPolicyTimeout, setTriggersafterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, getBeanFactory, getPhase, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, start, startReactively, stop, stopReactivelypublic 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<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> entryActions, java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> 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<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> entryActions, java.util.Collection<java.util.function.Function<StateContext<S,E>,reactor.core.publisher.Mono<java.lang.Void>>> 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 reactor.core.publisher.Mono<java.lang.Void> exit(StateContext<S,E> context)
Statepublic reactor.core.publisher.Mono<java.lang.Void> entry(StateContext<S,E> context)
Statepublic reactor.core.publisher.Flux<StateMachineEventResult<S,E>> sendEvent(org.springframework.messaging.Message<E> event)
StateE wrapped with a Message to the state and
return a StateMachineEventResult for results.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>