S - the type of stateE - the type of eventpublic class CompositeEnsembleListener<S,E> extends AbstractCompositeListener<EnsembleListener<S,E>> implements EnsembleListener<S,E>
EnsembleListener dispatcher.| Constructor and Description |
|---|
CompositeEnsembleListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensembleError(StateMachineEnsembleException exception)
Called when
StateMachineEnsemble resulted an error. |
void |
stateChanged(StateMachineContext<S,E> context)
Called when ensemble is discovering a state change.
|
void |
stateMachineJoined(StateMachine<S,E> stateMachine,
StateMachineContext<S,E> context)
Called when state machine joined an ensemble.
|
void |
stateMachineLeft(StateMachine<S,E> stateMachine,
StateMachineContext<S,E> context)
Called when state machine left an ensemble.
|
getListeners, register, setListeners, unregisterpublic void stateMachineJoined(StateMachine<S,E> stateMachine, StateMachineContext<S,E> context)
EnsembleListenerStateMachine who
requested a join. User of this listener should check that a
StateMachine is the one interested of. Implementation
may choose to notify other StateMachine joins if it is
able to do so. This may be called multiple time in case ensemble
has made a choice to leave machine due to ensemble errors.stateMachineJoined in interface EnsembleListener<S,E>stateMachine - the state machinecontext - the state machine contextpublic void stateMachineLeft(StateMachine<S,E> stateMachine, StateMachineContext<S,E> context)
EnsembleListenerStateMachine who
requested a leave. User of this listener should check that a
StateMachine is the one interested of. Implementation
may choose to notify other StateMachine leaves if it is
able to do so.stateMachineLeft in interface EnsembleListener<S,E>stateMachine - the state machinecontext - the state machine contextpublic void stateChanged(StateMachineContext<S,E> context)
EnsembleListenerstateChanged in interface EnsembleListener<S,E>context - the state machine contextpublic void ensembleError(StateMachineEnsembleException exception)
EnsembleListenerStateMachineEnsemble resulted an error.ensembleError in interface EnsembleListener<S,E>exception - the exception