S - the type of stateE - the type of eventpublic class DefaultStateMachineExecutor<S,E> extends LifecycleObjectSupport implements StateMachineExecutor<S,E>
StateMachineExecutor.StateMachineExecutor.StateMachineExecutorTransit<S,E>| Constructor and Description |
|---|
DefaultStateMachineExecutor(StateMachine<S,E> stateMachine,
StateMachine<S,E> relayStateMachine,
ExtendedState extendedState,
java.util.Collection<Transition<S,E>> transitions,
java.util.Map<Trigger<S,E>,Transition<S,E>> triggerToTransitionMap,
java.util.List<Transition<S,E>> triggerlessTransitions,
Transition<S,E> initialTransition,
org.springframework.messaging.Message<E> initialEvent)
Instantiates a new default state machine executor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Subclasses may implement this method with the start behavior.
|
protected void |
doStop()
Subclasses may implement this method with the stop behavior.
|
void |
execute()
Execute
StateMachineExecutor logic. |
void |
queueDeferredEvent(org.springframework.messaging.Message<E> message)
Queue deferred event.
|
void |
queueEvent(org.springframework.messaging.Message<E> message)
Queue event.
|
void |
queueTrigger(Trigger<S,E> trigger,
org.springframework.messaging.Message<E> message)
Queue trigger.
|
void |
setStateMachineExecutorTransit(StateMachineExecutor.StateMachineExecutorTransit<S,E> stateMachineExecutorTransit)
Sets the state machine executor transit.
|
afterPropertiesSet, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, start, stop, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstart, stoppublic DefaultStateMachineExecutor(StateMachine<S,E> stateMachine, StateMachine<S,E> relayStateMachine, ExtendedState extendedState, java.util.Collection<Transition<S,E>> transitions, java.util.Map<Trigger<S,E>,Transition<S,E>> triggerToTransitionMap, java.util.List<Transition<S,E>> triggerlessTransitions, Transition<S,E> initialTransition, org.springframework.messaging.Message<E> initialEvent)
stateMachine - the state machinerelayStateMachine - the relay state machineextendedState - the extended statetransitions - the transitionstriggerToTransitionMap - the trigger to transition maptriggerlessTransitions - the triggerless transitionspublic void queueEvent(org.springframework.messaging.Message<E> message)
StateMachineExecutorqueueEvent in interface StateMachineExecutor<S,E>message - the messagepublic void queueTrigger(Trigger<S,E> trigger, org.springframework.messaging.Message<E> message)
StateMachineExecutorqueueTrigger in interface StateMachineExecutor<S,E>trigger - the triggermessage - the messagepublic void queueDeferredEvent(org.springframework.messaging.Message<E> message)
StateMachineExecutorqueueDeferredEvent in interface StateMachineExecutor<S,E>message - the messagepublic void execute()
StateMachineExecutorStateMachineExecutor logic.execute in interface StateMachineExecutor<S,E>public void setStateMachineExecutorTransit(StateMachineExecutor.StateMachineExecutorTransit<S,E> stateMachineExecutorTransit)
StateMachineExecutorsetStateMachineExecutorTransit in interface StateMachineExecutor<S,E>stateMachineExecutorTransit - the state machine executor transitprotected void doStart()
LifecycleObjectSupportLifecycleObjectSupport.lifecycleLock.doStart in class LifecycleObjectSupportprotected void doStop()
LifecycleObjectSupportLifecycleObjectSupport.lifecycleLock.doStop in class LifecycleObjectSupport