Class LatchStateMachineListener<S,E>
java.lang.Object
org.springframework.statemachine.listener.StateMachineListenerAdapter<S,E>
org.springframework.statemachine.test.support.LatchStateMachineListener<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
StateMachineListener<S,E>
A
StateMachineListener which is used during the tests
to assert correct count of listener callbacks.- Author:
- Janne Valkealahti
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoideventNotAccepted(org.springframework.messaging.Message<E> event) Notified when event was not accepted.voidextendedStateChanged(Object key, Object value) Notified when extended state variable is either added, modified or removed.List<StateMachine<S,E>> List<StateMachine<S,E>> List<Transition<S,E>> List<Transition<S,E>> List<Transition<S,E>> voidreset(int stateChangedCount, int stateEnteredCount, int stateExitedCount, int eventNotAcceptedCount, int transitionCount, int transitionStartedCount, int transitionEndedCount, int stateMachineStartedCount, int stateMachineStoppedCount, int extendedStateChangedCount) voidNotified when state is changed.voidstateEntered(State<S, E> state) Notified when state is entered.voidstateExited(State<S, E> state) Notified when state is exited.voidstateMachineStarted(StateMachine<S, E> stateMachine) Notified when statemachine startsvoidstateMachineStopped(StateMachine<S, E> stateMachine) Notified when statemachine stopsvoidtransition(Transition<S, E> transition) Notified when transition happened.voidtransitionEnded(Transition<S, E> transition) Notified when transition ended.voidtransitionStarted(Transition<S, E> transition) Notified when transition started.Methods inherited from class org.springframework.statemachine.listener.StateMachineListenerAdapter
stateContext, stateMachineError
-
Constructor Details
-
LatchStateMachineListener
public LatchStateMachineListener()
-
-
Method Details
-
stateChanged
Description copied from interface:StateMachineListenerNotified when state is changed.- Specified by:
stateChangedin interfaceStateMachineListener<S,E> - Overrides:
stateChangedin classStateMachineListenerAdapter<S,E> - Parameters:
from- the source stateto- the target state
-
stateEntered
Description copied from interface:StateMachineListenerNotified when state is entered.- Specified by:
stateEnteredin interfaceStateMachineListener<S,E> - Overrides:
stateEnteredin classStateMachineListenerAdapter<S,E> - Parameters:
state- the state
-
stateExited
Description copied from interface:StateMachineListenerNotified when state is exited.- Specified by:
stateExitedin interfaceStateMachineListener<S,E> - Overrides:
stateExitedin classStateMachineListenerAdapter<S,E> - Parameters:
state- the state
-
eventNotAccepted
Description copied from interface:StateMachineListenerNotified when event was not accepted.- Specified by:
eventNotAcceptedin interfaceStateMachineListener<S,E> - Overrides:
eventNotAcceptedin classStateMachineListenerAdapter<S,E> - Parameters:
event- the event
-
transition
Description copied from interface:StateMachineListenerNotified when transition happened.- Specified by:
transitionin interfaceStateMachineListener<S,E> - Overrides:
transitionin classStateMachineListenerAdapter<S,E> - Parameters:
transition- the transition
-
transitionStarted
Description copied from interface:StateMachineListenerNotified when transition started.- Specified by:
transitionStartedin interfaceStateMachineListener<S,E> - Overrides:
transitionStartedin classStateMachineListenerAdapter<S,E> - Parameters:
transition- the transition
-
transitionEnded
Description copied from interface:StateMachineListenerNotified when transition ended.- Specified by:
transitionEndedin interfaceStateMachineListener<S,E> - Overrides:
transitionEndedin classStateMachineListenerAdapter<S,E> - Parameters:
transition- the transition
-
stateMachineStarted
Description copied from interface:StateMachineListenerNotified when statemachine starts- Specified by:
stateMachineStartedin interfaceStateMachineListener<S,E> - Overrides:
stateMachineStartedin classStateMachineListenerAdapter<S,E> - Parameters:
stateMachine- the statemachine
-
stateMachineStopped
Description copied from interface:StateMachineListenerNotified when statemachine stops- Specified by:
stateMachineStoppedin interfaceStateMachineListener<S,E> - Overrides:
stateMachineStoppedin classStateMachineListenerAdapter<S,E> - Parameters:
stateMachine- the statemachine
-
extendedStateChanged
Description copied from interface:StateMachineListenerNotified when extended state variable is either added, modified or removed.- Specified by:
extendedStateChangedin interfaceStateMachineListener<S,E> - Overrides:
extendedStateChangedin classStateMachineListenerAdapter<S,E> - Parameters:
key- the variable keyvalue- the variable value
-
reset
public void reset(int stateChangedCount, int stateEnteredCount, int stateExitedCount, int eventNotAcceptedCount, int transitionCount, int transitionStartedCount, int transitionEndedCount, int stateMachineStartedCount, int stateMachineStoppedCount, int extendedStateChangedCount) -
getStateChangedLatch
-
getStateEnteredLatch
-
getStateExitedLatch
-
getEventNotAcceptedLatch
-
getTransitionLatch
-
getTransitionStartedLatch
-
getTransitionEndedLatch
-
getStateMachineStartedLatch
-
getStateMachineStoppedLatch
-
getExtendedStateChangedLatch
-
getStateChanged
-
getStateEntered
-
getStateExited
-
getEventNotAccepted
-
getTransition
-
getTransitionStarted
-
getTransitionEnded
-
getStateMachineStarted
-
getStateMachineStopped
-
getExtendedStateChanged
-