Class EnsembleListenerAdapter<S,E>
java.lang.Object
org.springframework.statemachine.ensemble.EnsembleListenerAdapter<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
EnsembleListener<S,E>
Adapter implementation of
EnsembleListener implementing all
methods which extended implementation can override.- Author:
- Janne Valkealahti
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidensembleError(StateMachineEnsembleException exception) Called whenStateMachineEnsembleresulted an error.voidensembleLeaderGranted(StateMachine<S, E> stateMachine) Called when a state machine is granted a leader role in an ensemble.voidensembleLeaderRevoked(StateMachine<S, E> stateMachine) Called when a state machine is revoked from a leader role in an ensemble.voidstateChanged(StateMachineContext<S, E> context) Called when ensemble is discovering a state change.voidstateMachineJoined(StateMachine<S, E> stateMachine, StateMachineContext<S, E> context) Called when state machine joined an ensemble.voidstateMachineLeft(StateMachine<S, E> stateMachine, StateMachineContext<S, E> context) Called when state machine left an ensemble.
-
Constructor Details
-
EnsembleListenerAdapter
public EnsembleListenerAdapter()
-
-
Method Details
-
stateMachineJoined
Description copied from interface:EnsembleListenerCalled when state machine joined an ensemble. This callback is guaranteed to be called for aStateMachinewho requested a join. User of this listener should check that aStateMachineis the one interested of. Implementation may choose to notify otherStateMachinejoins 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.- Specified by:
stateMachineJoinedin interfaceEnsembleListener<S,E> - Parameters:
stateMachine- the state machinecontext- the state machine context
-
stateMachineLeft
Description copied from interface:EnsembleListenerCalled when state machine left an ensemble. This callback is guaranteed to be called for aStateMachinewho requested a leave. User of this listener should check that aStateMachineis the one interested of. Implementation may choose to notify otherStateMachineleaves if it is able to do so.- Specified by:
stateMachineLeftin interfaceEnsembleListener<S,E> - Parameters:
stateMachine- the state machinecontext- the state machine context
-
stateChanged
Description copied from interface:EnsembleListenerCalled when ensemble is discovering a state change.- Specified by:
stateChangedin interfaceEnsembleListener<S,E> - Parameters:
context- the state machine context
-
ensembleError
Description copied from interface:EnsembleListenerCalled whenStateMachineEnsembleresulted an error.- Specified by:
ensembleErrorin interfaceEnsembleListener<S,E> - Parameters:
exception- the exception
-
ensembleLeaderGranted
Description copied from interface:EnsembleListenerCalled when a state machine is granted a leader role in an ensemble.- Specified by:
ensembleLeaderGrantedin interfaceEnsembleListener<S,E> - Parameters:
stateMachine- the state machine
-
ensembleLeaderRevoked
Description copied from interface:EnsembleListenerCalled when a state machine is revoked from a leader role in an ensemble.- Specified by:
ensembleLeaderRevokedin interfaceEnsembleListener<S,E> - Parameters:
stateMachine- the state machine
-