S - the type of stateE - the type of eventpublic class StateMachineInterceptorAdapter<S,E> extends java.lang.Object implements StateMachineInterceptor<S,E>
StateMachineInterceptor.| Constructor and Description |
|---|
StateMachineInterceptorAdapter() |
| 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)
Called after a state change.
|
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)
Called prior of a state change.
|
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.
|
public org.springframework.messaging.Message<E> preEvent(org.springframework.messaging.Message<E> message, StateMachine<S,E> stateMachine)
StateMachineInterceptorpreEvent in interface StateMachineInterceptor<S,E>message - the messagestateMachine - the state machinepublic void preStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine)
StateMachineInterceptorpreStateChange in interface StateMachineInterceptor<S,E>state - the statemessage - the messagetransition - the transitionstateMachine - the state machinepublic void preStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine, StateMachine<S,E> rootStateMachine)
StateMachineInterceptorpreStateChange in interface StateMachineInterceptor<S,E>state - the statemessage - the messagetransition - the transitionstateMachine - the state machinerootStateMachine - the root state machinepublic void postStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine)
StateMachineInterceptorpostStateChange in interface StateMachineInterceptor<S,E>state - the statemessage - the messagetransition - the transitionstateMachine - the state machinepublic void postStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine, StateMachine<S,E> rootStateMachine)
StateMachineInterceptorpostStateChange in interface StateMachineInterceptor<S,E>state - the statemessage - the messagetransition - the transitionstateMachine - the state machinerootStateMachine - the root state machinepublic StateContext<S,E> preTransition(StateContext<S,E> stateContext)
StateMachineInterceptornull from this method will break the transtion
chain.preTransition in interface StateMachineInterceptor<S,E>stateContext - the state contextpublic StateContext<S,E> postTransition(StateContext<S,E> stateContext)
StateMachineInterceptorpostTransition in interface StateMachineInterceptor<S,E>stateContext - the state contextpublic java.lang.Exception stateMachineError(StateMachine<S,E> stateMachine, java.lang.Exception exception)
StateMachineInterceptorstateMachineError in interface StateMachineInterceptor<S,E>stateMachine - the state machineexception - the exception