public class GenericPersistStateMachineHandler<S,E> extends AbstractPersistStateMachineHandler<S,E>
GenericPersistStateMachineHandler is a recipe which can be used to
handle a state change of an arbitrary entity in a persistent storage.
FactoryPersistStateMachineHandler
to provide thread safe feature instead.AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,E>| Modifier and Type | Field and Description |
|---|---|
protected StateMachine<S,E> |
stateMachine |
interceptor, listeners| Constructor and Description |
|---|
GenericPersistStateMachineHandler(StateMachine<S,E> stateMachine)
Instantiates a new persist state machine handler.
|
| Modifier and Type | Method and Description |
|---|---|
protected StateMachine<S,E> |
getInitStateMachine() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
addPersistStateChangeListener, handleEventWithState, handleEventWithStateReactively, initStateMachineafterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, doPreStartReactively, doPreStopReactively, getBeanFactory, getPhase, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, start, startReactively, stop, stopReactivelyprotected final StateMachine<S,E> stateMachine
public GenericPersistStateMachineHandler(StateMachine<S,E> stateMachine)
stateMachine - the state machineprotected void onInit()
throws java.lang.Exception
LifecycleObjectSupportInitializingBean phase.onInit in class LifecycleObjectSupportjava.lang.Exception - exceptionprotected StateMachine<S,E> getInitStateMachine()
getInitStateMachine in class AbstractPersistStateMachineHandler<S,E>