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.- Author:
- Janne Valkealahti
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,
E> -
Field Summary
Fields inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
interceptor, listeners
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ConstructorDescriptionGenericPersistStateMachineHandler
(StateMachine<S, E> stateMachine) Instantiates a new persist state machine handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected StateMachine<S,
E> protected void
onInit()
Subclasses may implement this for initialization logic.Methods inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
addPersistStateChangeListener, handleEventWithState, handleEventWithStateReactively, initStateMachine
Methods 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, stopReactively
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:LifecycleObjectSupport
Subclasses may implement this for initialization logic. Called during theInitializingBean
phase.- Overrides:
onInit
in classLifecycleObjectSupport
- Throws:
Exception
- exception
-
getInitStateMachine
- Specified by:
getInitStateMachine
in classAbstractPersistStateMachineHandler<S,
E>
-