S
- the type of stateE
- the type of eventpublic interface StateMachineExecutor<S,E>
StateMachine
event executor.Modifier and Type | Interface and Description |
---|---|
static interface |
StateMachineExecutor.StateMachineExecutorTransit<S,E>
Callback interface when executor wants to handle transit.
|
Modifier and Type | Method and Description |
---|---|
void |
addStateMachineInterceptor(StateMachineInterceptor<S,E> interceptor)
Adds the state machine interceptor.
|
void |
execute()
Execute
StateMachineExecutor logic. |
void |
executeTriggerlessTransitions(StateContext<S,E> context,
State<S,E> state)
Execute and check all triggerless transitions.
|
java.util.concurrent.locks.Lock |
getLock()
Gets the execution lock.
|
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 |
setForwardedInitialEvent(org.springframework.messaging.Message<E> message)
Set initial forwarded event.
|
void |
setInitialEnabled(boolean enabled)
Sets the if initial stage is enabled.
|
void |
setStateMachineExecutorTransit(StateMachineExecutor.StateMachineExecutorTransit<S,E> stateMachineExecutorTransit)
Sets the state machine executor transit.
|
void |
start()
Start executor.
|
void |
stop()
Stop executor.
|
void queueEvent(org.springframework.messaging.Message<E> message)
message
- the messagevoid queueTrigger(Trigger<S,E> trigger, org.springframework.messaging.Message<E> message)
trigger
- the triggermessage
- the messagevoid queueDeferredEvent(org.springframework.messaging.Message<E> message)
message
- the messagevoid executeTriggerlessTransitions(StateContext<S,E> context, State<S,E> state)
context
- the state contextstate
- the statevoid execute()
StateMachineExecutor
logic.void setInitialEnabled(boolean enabled)
enabled
- the new flagvoid start()
LifecycleObjectSupport.start()
void stop()
LifecycleObjectSupport.stop()
void setForwardedInitialEvent(org.springframework.messaging.Message<E> message)
message
- the forwarded messageStateMachineAccess.setForwardedInitialEvent(Message)
void setStateMachineExecutorTransit(StateMachineExecutor.StateMachineExecutorTransit<S,E> stateMachineExecutorTransit)
stateMachineExecutorTransit
- the state machine executor transitvoid addStateMachineInterceptor(StateMachineInterceptor<S,E> interceptor)
interceptor
- the interceptorjava.util.concurrent.locks.Lock getLock()