Class StateMachineInterceptorList<S,E>
java.lang.Object
org.springframework.statemachine.support.StateMachineInterceptorList<S,E>
- Type Parameters:
S- the type of stateE- the type of event
Support class working with a
StateMachineInterceptors.- Author:
- Janne Valkealahti
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(StateMachineInterceptor<S, E> interceptor) Adds interceptor to the list.voidpostStateChange(State<S, E> state, org.springframework.messaging.Message<E> message, Transition<S, E> transition, StateMachine<S, E> stateMachine, StateMachine<S, E> rootStateMachine) Post state change.postTransition(StateContext<S, E> stateContext) Post transition.org.springframework.messaging.Message<E>preEvent(org.springframework.messaging.Message<E> message, StateMachine<S, E> stateMachine) Pre event.voidpreStateChange(State<S, E> state, org.springframework.messaging.Message<E> message, Transition<S, E> transition, StateMachine<S, E> stateMachine, StateMachine<S, E> rootStateMachine) Pre state change.preTransition(StateContext<S, E> stateContext) Pre transition.booleanremove(StateMachineInterceptor<S, E> interceptor) Removes interceptor from the list.booleanset(List<StateMachineInterceptor<S, E>> interceptors) Sets the interceptors, clears any existing interceptors.stateMachineError(StateMachine<S, E> stateMachine, Exception exception) State machine error.toString()
-
Constructor Details
-
StateMachineInterceptorList
public StateMachineInterceptorList()
-
-
Method Details
-
set
Sets the interceptors, clears any existing interceptors.- Parameters:
interceptors- the list of interceptors- Returns:
trueif interceptor list changed as a result of the call
-
add
Adds interceptor to the list.- Parameters:
interceptor- the interceptor- Returns:
true(as specified byCollection.add(E))
-
remove
Removes interceptor from the list.- Parameters:
interceptor- the interceptor- Returns:
true(as specified byCollection.remove(java.lang.Object))
-
preEvent
public org.springframework.messaging.Message<E> preEvent(org.springframework.messaging.Message<E> message, StateMachine<S, E> stateMachine) Pre event.- Parameters:
message- the messagestateMachine- the state machine- Returns:
- the message
-
preStateChange
public void preStateChange(State<S, E> state, org.springframework.messaging.Message<E> message, Transition<S, E> transition, StateMachine<S, E> stateMachine, StateMachine<S, E> rootStateMachine) Pre state change.- Parameters:
state- the statemessage- the messagetransition- the transitionstateMachine- the state machinerootStateMachine- the root state machine
-
postStateChange
public void postStateChange(State<S, E> state, org.springframework.messaging.Message<E> message, Transition<S, E> transition, StateMachine<S, E> stateMachine, StateMachine<S, E> rootStateMachine) Post state change.- Parameters:
state- the statemessage- the messagetransition- the transitionstateMachine- the state machinerootStateMachine- the root state machine
-
preTransition
Pre transition.- Parameters:
stateContext- the state context- Returns:
- the state context
-
postTransition
Post transition.- Parameters:
stateContext- the state context- Returns:
- the state context
-
stateMachineError
State machine error.- Parameters:
stateMachine- the state machineexception- the exception- Returns:
- the exception
-
toString
-