S - the type of stateE - the type of eventpublic class LatchStateMachineListener<S,E> extends StateMachineListenerAdapter<S,E>
StateMachineListener which is used during the tests
to assert correct count of listener callbacks.| Modifier and Type | Class and Description |
|---|---|
static class |
LatchStateMachineListener.ExtendedStateChangedWrapper |
static class |
LatchStateMachineListener.StateChangedWrapper<S,E> |
| Constructor and Description |
|---|
LatchStateMachineListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
eventNotAccepted(org.springframework.messaging.Message<E> event)
Notified when event was not accepted.
|
void |
extendedStateChanged(java.lang.Object key,
java.lang.Object value)
Notified when extended state variable is either added, modified or removed.
|
java.util.List<org.springframework.messaging.Message<E>> |
getEventNotAccepted() |
java.util.concurrent.CountDownLatch |
getEventNotAcceptedLatch() |
java.util.List<LatchStateMachineListener.ExtendedStateChangedWrapper> |
getExtendedStateChanged() |
java.util.concurrent.CountDownLatch |
getExtendedStateChangedLatch() |
java.util.List<LatchStateMachineListener.StateChangedWrapper<S,E>> |
getStateChanged() |
java.util.concurrent.CountDownLatch |
getStateChangedLatch() |
java.util.List<State<S,E>> |
getStateEntered() |
java.util.concurrent.CountDownLatch |
getStateEnteredLatch() |
java.util.List<State<S,E>> |
getStateExited() |
java.util.concurrent.CountDownLatch |
getStateExitedLatch() |
java.util.List<StateMachine<S,E>> |
getStateMachineStarted() |
java.util.concurrent.CountDownLatch |
getStateMachineStartedLatch() |
java.util.List<StateMachine<S,E>> |
getStateMachineStopped() |
java.util.concurrent.CountDownLatch |
getStateMachineStoppedLatch() |
java.util.List<Transition<S,E>> |
getTransition() |
java.util.List<Transition<S,E>> |
getTransitionEnded() |
java.util.concurrent.CountDownLatch |
getTransitionEndedLatch() |
java.util.concurrent.CountDownLatch |
getTransitionLatch() |
java.util.List<Transition<S,E>> |
getTransitionStarted() |
java.util.concurrent.CountDownLatch |
getTransitionStartedLatch() |
void |
reset(int stateChangedCount,
int stateEnteredCount,
int stateExitedCount,
int eventNotAcceptedCount,
int transitionCount,
int transitionStartedCount,
int transitionEndedCount,
int stateMachineStartedCount,
int stateMachineStoppedCount,
int extendedStateChangedCount) |
void |
stateChanged(State<S,E> from,
State<S,E> to)
Notified when state is changed.
|
void |
stateEntered(State<S,E> state)
Notified when state is entered.
|
void |
stateExited(State<S,E> state)
Notified when state is exited.
|
void |
stateMachineStarted(StateMachine<S,E> stateMachine)
Notified when statemachine starts
|
void |
stateMachineStopped(StateMachine<S,E> stateMachine)
Notified when statemachine stops
|
void |
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.
|
stateContext, stateMachineErrorpublic void stateChanged(State<S,E> from, State<S,E> to)
StateMachineListenerstateChanged in interface StateMachineListener<S,E>stateChanged in class StateMachineListenerAdapter<S,E>from - the source stateto - the target statepublic void stateEntered(State<S,E> state)
StateMachineListenerstateEntered in interface StateMachineListener<S,E>stateEntered in class StateMachineListenerAdapter<S,E>state - the statepublic void stateExited(State<S,E> state)
StateMachineListenerstateExited in interface StateMachineListener<S,E>stateExited in class StateMachineListenerAdapter<S,E>state - the statepublic void eventNotAccepted(org.springframework.messaging.Message<E> event)
StateMachineListenereventNotAccepted in interface StateMachineListener<S,E>eventNotAccepted in class StateMachineListenerAdapter<S,E>event - the eventpublic void transition(Transition<S,E> transition)
StateMachineListenertransition in interface StateMachineListener<S,E>transition in class StateMachineListenerAdapter<S,E>transition - the transitionpublic void transitionStarted(Transition<S,E> transition)
StateMachineListenertransitionStarted in interface StateMachineListener<S,E>transitionStarted in class StateMachineListenerAdapter<S,E>transition - the transitionpublic void transitionEnded(Transition<S,E> transition)
StateMachineListenertransitionEnded in interface StateMachineListener<S,E>transitionEnded in class StateMachineListenerAdapter<S,E>transition - the transitionpublic void stateMachineStarted(StateMachine<S,E> stateMachine)
StateMachineListenerstateMachineStarted in interface StateMachineListener<S,E>stateMachineStarted in class StateMachineListenerAdapter<S,E>stateMachine - the statemachinepublic void stateMachineStopped(StateMachine<S,E> stateMachine)
StateMachineListenerstateMachineStopped in interface StateMachineListener<S,E>stateMachineStopped in class StateMachineListenerAdapter<S,E>stateMachine - the statemachinepublic void extendedStateChanged(java.lang.Object key,
java.lang.Object value)
StateMachineListenerextendedStateChanged in interface StateMachineListener<S,E>extendedStateChanged in class StateMachineListenerAdapter<S,E>key - the variable keyvalue - the variable valuepublic void reset(int stateChangedCount,
int stateEnteredCount,
int stateExitedCount,
int eventNotAcceptedCount,
int transitionCount,
int transitionStartedCount,
int transitionEndedCount,
int stateMachineStartedCount,
int stateMachineStoppedCount,
int extendedStateChangedCount)
public java.util.concurrent.CountDownLatch getStateChangedLatch()
public java.util.concurrent.CountDownLatch getStateEnteredLatch()
public java.util.concurrent.CountDownLatch getStateExitedLatch()
public java.util.concurrent.CountDownLatch getEventNotAcceptedLatch()
public java.util.concurrent.CountDownLatch getTransitionLatch()
public java.util.concurrent.CountDownLatch getTransitionStartedLatch()
public java.util.concurrent.CountDownLatch getTransitionEndedLatch()
public java.util.concurrent.CountDownLatch getStateMachineStartedLatch()
public java.util.concurrent.CountDownLatch getStateMachineStoppedLatch()
public java.util.concurrent.CountDownLatch getExtendedStateChangedLatch()
public java.util.List<LatchStateMachineListener.StateChangedWrapper<S,E>> getStateChanged()
public java.util.List<org.springframework.messaging.Message<E>> getEventNotAccepted()
public java.util.List<Transition<S,E>> getTransition()
public java.util.List<Transition<S,E>> getTransitionStarted()
public java.util.List<Transition<S,E>> getTransitionEnded()
public java.util.List<StateMachine<S,E>> getStateMachineStarted()
public java.util.List<StateMachine<S,E>> getStateMachineStopped()
public java.util.List<LatchStateMachineListener.ExtendedStateChangedWrapper> getExtendedStateChanged()