public abstract class AbstractPersistStateMachineHandler<S,E> extends LifecycleObjectSupport
AbstractPersistStateMachineHandler
is a base recipe which can be used to
handle a state change of an arbitrary entity in a persistent storage.Modifier and Type | Class and Description |
---|---|
static interface |
AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,E>
The listener interface for receiving persistStateChange events.
|
Modifier and Type | Field and Description |
---|---|
protected org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.PersistingStateChangeInterceptor |
interceptor |
protected org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.CompositePersistStateChangeListener |
listeners |
Constructor and Description |
---|
AbstractPersistStateMachineHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addPersistStateChangeListener(AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,E> listener)
Adds the persist state change listener.
|
protected abstract StateMachine<S,E> |
getInitStateMachine() |
boolean |
handleEventWithState(org.springframework.messaging.Message<E> event,
S state)
Deprecated.
|
reactor.core.publisher.Mono<java.lang.Void> |
handleEventWithStateReactively(org.springframework.messaging.Message<E> event,
S state)
Handle event with entity reactively.
|
protected void |
initStateMachine(StateMachine<S,E> stateMachine) |
afterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, doPreStartReactively, doPreStopReactively, getBeanFactory, getPhase, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, start, startReactively, stop, stopReactively
protected final org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.PersistingStateChangeInterceptor interceptor
protected final org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.CompositePersistStateChangeListener listeners
protected abstract StateMachine<S,E> getInitStateMachine()
protected void initStateMachine(StateMachine<S,E> stateMachine)
@Deprecated public boolean handleEventWithState(org.springframework.messaging.Message<E> event, S state)
event
- the eventstate
- the statehandleEventWithStateReactively(Message, Object)
public reactor.core.publisher.Mono<java.lang.Void> handleEventWithStateReactively(org.springframework.messaging.Message<E> event, S state)
event
- the eventstate
- the statepublic void addPersistStateChangeListener(AbstractPersistStateMachineHandler.GenericPersistStateChangeListener<S,E> listener)
listener
- the listener