S
- the type of stateE
- the type of eventpublic class StateMachineInterceptorList<S,E>
extends java.lang.Object
StateMachineInterceptor
s.Constructor and Description |
---|
StateMachineInterceptorList() |
Modifier and Type | Method and Description |
---|---|
boolean |
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)
Post state change.
|
StateContext<S,E> |
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)
Pre state change.
|
StateContext<S,E> |
preTransition(StateContext<S,E> stateContext)
Pre transition.
|
boolean |
remove(StateMachineInterceptor<S,E> interceptor)
Removes interceptor from the list.
|
boolean |
set(java.util.List<StateMachineInterceptor<S,E>> interceptors)
Sets the interceptors, clears any existing interceptors.
|
java.lang.Exception |
stateMachineError(StateMachine<S,E> stateMachine,
java.lang.Exception exception)
State machine error.
|
java.lang.String |
toString() |
public boolean set(java.util.List<StateMachineInterceptor<S,E>> interceptors)
interceptors
- the list of interceptorspublic boolean add(StateMachineInterceptor<S,E> interceptor)
interceptor
- the interceptorCollection.add(E)
)public boolean remove(StateMachineInterceptor<S,E> interceptor)
interceptor
- the interceptorCollection.remove(java.lang.Object)
)public org.springframework.messaging.Message<E> preEvent(org.springframework.messaging.Message<E> message, StateMachine<S,E> stateMachine)
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)
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)
state
- the statemessage
- the messagetransition
- the transitionstateMachine
- the state machinepublic StateContext<S,E> preTransition(StateContext<S,E> stateContext)
stateContext
- the state contextpublic StateContext<S,E> postTransition(StateContext<S,E> stateContext)
stateContext
- the state contextpublic java.lang.Exception stateMachineError(StateMachine<S,E> stateMachine, java.lang.Exception exception)
stateMachine
- the state machineexception
- the exceptionpublic java.lang.String toString()
toString
in class java.lang.Object