Class GenericPersistStateMachineHandler<S,E>
java.lang.Object
org.springframework.statemachine.support.LifecycleObjectSupport
org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler<S,E>
org.springframework.statemachine.recipes.persist.GenericPersistStateMachineHandler<S,E>
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,StateMachineReactiveLifecycle
- Direct Known Subclasses:
PersistStateMachineHandler
GenericPersistStateMachineHandler is a recipe which can be used to
handle a state change of an arbitrary entity in a persistent storage.
For concurrent usage, please consider using
FactoryPersistStateMachineHandler
to provide thread safe feature instead.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,E> -
Field Summary
FieldsFields inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
interceptor, listenersFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionGenericPersistStateMachineHandler(StateMachine<S, E> stateMachine) Instantiates a new persist state machine handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected StateMachine<S,E> protected voidonInit()Subclasses may implement this for initialization logic.Methods inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
addPersistStateChangeListener, handleEventWithState, handleEventWithStateReactively, initStateMachineMethods inherited from class org.springframework.statemachine.support.LifecycleObjectSupport
afterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, doPreStartReactively, doPreStopReactively, getBeanFactory, getPhase, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, start, startReactively, stop, stopReactivelyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Field Details
-
stateMachine
-
-
Constructor Details
-
GenericPersistStateMachineHandler
Instantiates a new persist state machine handler.- Parameters:
stateMachine- the state machine
-
-
Method Details
-
onInit
Description copied from class:LifecycleObjectSupportSubclasses may implement this for initialization logic. Called during theInitializingBeanphase.- Overrides:
onInitin classLifecycleObjectSupport- Throws:
Exception- exception
-
getInitStateMachine
- Specified by:
getInitStateMachinein classAbstractPersistStateMachineHandler<S,E>
-