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
StateMachineInterceptor
s.- Author:
- Janne Valkealahti
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(StateMachineInterceptor<S, E> interceptor) Adds interceptor to the list.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.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.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.preTransition
(StateContext<S, E> stateContext) Pre transition.boolean
remove
(StateMachineInterceptor<S, E> interceptor) Removes interceptor from the list.boolean
set
(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:
true
if 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
-