Interface StateMachineListener<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Known Implementing Classes:
CompositeStateMachineListener
,LatchStateMachineListener
,StateMachineListenerAdapter
,StateMachineObjectSupport.StateMachineListenerRelay
public interface StateMachineListener<S,E>
StateMachineListener
for various state machine events.- Author:
- Janne Valkealahti
-
Method Summary
Modifier and TypeMethodDescriptionvoid
eventNotAccepted
(org.springframework.messaging.Message<E> event) Notified when event was not accepted.void
extendedStateChanged
(Object key, Object value) Notified when extended state variable is either added, modified or removed.void
Notified when state is changed.void
stateContext
(StateContext<S, E> stateContext) Notified on variousStateContext.Stage
s about aStateContext
.void
stateEntered
(State<S, E> state) Notified when state is entered.void
stateExited
(State<S, E> state) Notified when state is exited.void
stateMachineError
(StateMachine<S, E> stateMachine, Exception exception) Notified when statemachine enters error it can't recover from.void
stateMachineStarted
(StateMachine<S, E> stateMachine) Notified when statemachine startsvoid
stateMachineStopped
(StateMachine<S, E> stateMachine) Notified when statemachine stopsvoid
transition
(Transition<S, E> transition) Notified when transition happened.void
transitionEnded
(Transition<S, E> transition) Notified when transition ended.void
transitionStarted
(Transition<S, E> transition) Notified when transition started.
-
Method Details
-
stateChanged
Notified when state is changed.- Parameters:
from
- the source stateto
- the target state
-
stateEntered
Notified when state is entered.- Parameters:
state
- the state
-
stateExited
Notified when state is exited.- Parameters:
state
- the state
-
eventNotAccepted
Notified when event was not accepted.- Parameters:
event
- the event
-
transition
Notified when transition happened.- Parameters:
transition
- the transition
-
transitionStarted
Notified when transition started.- Parameters:
transition
- the transition
-
transitionEnded
Notified when transition ended.- Parameters:
transition
- the transition
-
stateMachineStarted
Notified when statemachine starts- Parameters:
stateMachine
- the statemachine
-
stateMachineStopped
Notified when statemachine stops- Parameters:
stateMachine
- the statemachine
-
stateMachineError
Notified when statemachine enters error it can't recover from.- Parameters:
stateMachine
- the state machineexception
- the exception
-
extendedStateChanged
Notified when extended state variable is either added, modified or removed.- Parameters:
key
- the variable keyvalue
- the variable value
-
stateContext
Notified on variousStateContext.Stage
s about aStateContext
.- Parameters:
stateContext
- the state context
-