Class FactoryPersistStateMachineHandler<S,E>
java.lang.Object
org.springframework.statemachine.support.LifecycleObjectSupport
org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler<S,E>
org.springframework.statemachine.recipes.persist.FactoryPersistStateMachineHandler<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
FactoryPersistStateMachineHandler
is a recipe can be used to
handle a state change of an arbitrary entity in a persistent storage.
This implementation accepts
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.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,
E> -
Field Summary
Modifier and TypeFieldDescriptionprotected final StateMachineBuilder.Builder<S,
E> protected final StateMachineFactory<S,
E> Fields inherited from class org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler
interceptor, listeners
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ConstructorDescription -
Method Summary
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, onInit, 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
-
factory
-
builder
-
-
Constructor Details
-
FactoryPersistStateMachineHandler
-
FactoryPersistStateMachineHandler
-
-
Method Details
-
getInitStateMachine
- Specified by:
getInitStateMachine
in classAbstractPersistStateMachineHandler<S,
E>
-