Class AbstractPersistStateMachineHandler<S,E>
java.lang.Object
org.springframework.statemachine.support.LifecycleObjectSupport
org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler<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:
FactoryPersistStateMachineHandler
,GenericPersistStateMachineHandler
AbstractPersistStateMachineHandler
is a base recipe which can be used to
handle a state change of an arbitrary entity in a persistent storage.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The listener interface for receiving persistStateChange events. -
Field Summary
Modifier and TypeFieldDescriptionprotected final AbstractPersistStateMachineHandler<S,
E>.org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.PersistingStateChangeInterceptor protected final AbstractPersistStateMachineHandler<S,
E>.org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.CompositePersistStateChangeListener Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPersistStateChangeListener
(AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S, E> listener) Adds the persist state change listener.protected abstract StateMachine<S,
E> boolean
handleEventWithState
(org.springframework.messaging.Message<E> event, S state) Deprecated.reactor.core.publisher.Mono<Void>
handleEventWithStateReactively
(org.springframework.messaging.Message<E> event, S state) Handle event with entity reactively.protected void
initStateMachine
(StateMachine<S, E> stateMachine) 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
-
interceptor
protected final AbstractPersistStateMachineHandler<S,E>.org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.PersistingStateChangeInterceptor interceptor -
listeners
protected final AbstractPersistStateMachineHandler<S,E>.org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.CompositePersistStateChangeListener listeners
-
-
Constructor Details
-
AbstractPersistStateMachineHandler
public AbstractPersistStateMachineHandler()
-
-
Method Details
-
getInitStateMachine
-
initStateMachine
-
handleEventWithState
@Deprecated public boolean handleEventWithState(org.springframework.messaging.Message<E> event, S state) Deprecated.Handle event with entity.- Parameters:
event
- the eventstate
- the state- Returns:
- true if event was accepted
- See Also:
-
handleEventWithStateReactively
public reactor.core.publisher.Mono<Void> handleEventWithStateReactively(org.springframework.messaging.Message<E> event, S state) Handle event with entity reactively.- Parameters:
event
- the eventstate
- the state- Returns:
- mono for completion
-
addPersistStateChangeListener
public void addPersistStateChangeListener(AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S, E> listener) Adds the persist state change listener.- Parameters:
listener
- the listener
-