S
- the type of stateE
- the type of eventpublic abstract class StateMachineEnsembleObjectSupport<S,E> extends LifecycleObjectSupport implements StateMachineEnsemble<S,E>
StateMachineEnsemble
s.Constructor and Description |
---|
StateMachineEnsembleObjectSupport() |
Modifier and Type | Method and Description |
---|---|
void |
addEnsembleListener(EnsembleListener<S,E> listener)
Adds the ensemble listener.
|
abstract void |
join(StateMachine<S,E> stateMachine)
Request a join to a state machine ensemble.
|
abstract void |
leave(StateMachine<S,E> stateMachine)
Request a leave from an ensemble.
|
protected void |
notifyError(StateMachineEnsembleException exception) |
protected void |
notifyGranted(StateMachine<S,E> stateMachine) |
protected void |
notifyJoined(StateMachine<S,E> stateMachine,
StateMachineContext<S,E> context) |
protected void |
notifyLeft(StateMachine<S,E> stateMachine,
StateMachineContext<S,E> context) |
protected void |
notifyRevoked(StateMachine<S,E> stateMachine) |
protected void |
notifyStateChanged(StateMachineContext<S,E> context) |
void |
removeEnsembleListener(EnsembleListener<S,E> listener)
Removes the ensemble listener.
|
afterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, doPreStartReactively, doPreStopReactively, getBeanFactory, getPhase, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, start, startReactively, stop, stopReactively
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLeader, getState, setState
public abstract void join(StateMachine<S,E> stateMachine)
StateMachineEnsemble
EnsembleListener
and
EnsembleListener.stateMachineJoined(StateMachine, StateMachineContext)
is called with a StateMachine
instance for successful join.join
in interface StateMachineEnsemble<S,E>
stateMachine
- the state machinepublic abstract void leave(StateMachine<S,E> stateMachine)
StateMachineEnsemble
StateMachine
. Additionally
EnsembleListener.stateMachineLeft(StateMachine, StateMachineContext)
is called when leave request is fully processed.leave
in interface StateMachineEnsemble<S,E>
stateMachine
- the state machinepublic void addEnsembleListener(EnsembleListener<S,E> listener)
StateMachineEnsemble
addEnsembleListener
in interface StateMachineEnsemble<S,E>
listener
- the listenerpublic void removeEnsembleListener(EnsembleListener<S,E> listener)
StateMachineEnsemble
removeEnsembleListener
in interface StateMachineEnsemble<S,E>
listener
- the listenerprotected void notifyJoined(StateMachine<S,E> stateMachine, StateMachineContext<S,E> context)
protected void notifyLeft(StateMachine<S,E> stateMachine, StateMachineContext<S,E> context)
protected void notifyError(StateMachineEnsembleException exception)
protected void notifyGranted(StateMachine<S,E> stateMachine)
protected void notifyRevoked(StateMachine<S,E> stateMachine)
protected void notifyStateChanged(StateMachineContext<S,E> context)