S
- the type of stateE
- the type of eventpublic interface StateMachineInterceptor<S,E>
Modifier and Type | Method and Description |
---|---|
void |
postStateChange(State<S,E> state,
org.springframework.messaging.Message<E> message,
Transition<S,E> transition,
StateMachine<S,E> stateMachine,
StateMachine<S,E> rootStateMachine)
Called after a state change.
|
StateContext<S,E> |
postTransition(StateContext<S,E> stateContext)
Called after of a transition if transition happened.
|
org.springframework.messaging.Message<E> |
preEvent(org.springframework.messaging.Message<E> message,
StateMachine<S,E> stateMachine)
Called before message is sent to processing.
|
void |
preStateChange(State<S,E> state,
org.springframework.messaging.Message<E> message,
Transition<S,E> transition,
StateMachine<S,E> stateMachine,
StateMachine<S,E> rootStateMachine)
Called prior of a state change.
|
StateContext<S,E> |
preTransition(StateContext<S,E> stateContext)
Called prior of a start of a transition.
|
java.lang.Exception |
stateMachineError(StateMachine<S,E> stateMachine,
java.lang.Exception exception)
State when state machine is about to enter error it can't recover.
|
org.springframework.messaging.Message<E> preEvent(org.springframework.messaging.Message<E> message, StateMachine<S,E> stateMachine)
message
- the messagestateMachine
- the state machinevoid preStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine, StateMachine<S,E> rootStateMachine)
state
- the statemessage
- the messagetransition
- the transitionstateMachine
- the state machinerootStateMachine
- the root state machinevoid postStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine, StateMachine<S,E> rootStateMachine)
state
- the statemessage
- the messagetransition
- the transitionstateMachine
- the state machinerootStateMachine
- the root state machineStateContext<S,E> preTransition(StateContext<S,E> stateContext)
null
from this method will break the transtion
chain.stateContext
- the state contextStateContext<S,E> postTransition(StateContext<S,E> stateContext)
stateContext
- the state contextjava.lang.Exception stateMachineError(StateMachine<S,E> stateMachine, java.lang.Exception exception)
stateMachine
- the state machineexception
- the exception