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.
|
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.
|
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)
StateMachineInterceptor
preEvent
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)
StateMachineInterceptor
preStateChange
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)
StateMachineInterceptor
postStateChange
in interface StateMachineInterceptor<S,E>
state
- the statemessage
- the messagetransition
- the transitionstateMachine
- the state machinepublic StateContext<S,E> preTransition(StateContext<S,E> stateContext)
StateMachineInterceptor
null
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)
StateMachineInterceptor
postTransition
in interface StateMachineInterceptor<S,E>
stateContext
- the state contextpublic java.lang.Exception stateMachineError(StateMachine<S,E> stateMachine, java.lang.Exception exception)
StateMachineInterceptor
stateMachineError
in interface StateMachineInterceptor<S,E>
stateMachine
- the state machineexception
- the exception