public class FactoryPersistStateMachineHandler<S,E> extends AbstractPersistStateMachineHandler<S,E>
FactoryPersistStateMachineHandler
is a recipe can be used to
handle a state change of an arbitrary entity in a persistent storage.
StateMachineFactory
or StateMachineBuilder.Builder
to provide thread safe feature
without sharing same state machine in concurrent environment.
New state machine will be created when handling method is called.AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,E>
Modifier and Type | Field and Description |
---|---|
protected StateMachineBuilder.Builder<S,E> |
builder |
protected StateMachineFactory<S,E> |
factory |
interceptor, listeners
Constructor and Description |
---|
FactoryPersistStateMachineHandler(StateMachineBuilder.Builder<S,E> builder) |
FactoryPersistStateMachineHandler(StateMachineFactory<S,E> factory) |
Modifier and Type | Method and Description |
---|---|
protected StateMachine<S,E> |
getInitStateMachine() |
addPersistStateChangeListener, handleEventWithState, handleEventWithStateReactively, initStateMachine
afterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, doPreStartReactively, doPreStopReactively, getBeanFactory, getPhase, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, start, startReactively, stop, stopReactively
protected final StateMachineFactory<S,E> factory
protected final StateMachineBuilder.Builder<S,E> builder
public FactoryPersistStateMachineHandler(StateMachineBuilder.Builder<S,E> builder)
public FactoryPersistStateMachineHandler(StateMachineFactory<S,E> factory)
protected StateMachine<S,E> getInitStateMachine()
getInitStateMachine
in class AbstractPersistStateMachineHandler<S,E>