java.lang.Object
org.springframework.statemachine.support.LifecycleObjectSupport
org.springframework.statemachine.state.AbstractState<S,E>
org.springframework.statemachine.state.AbstractSimpleState<S,E>
org.springframework.statemachine.state.ObjectState<S,E>
org.springframework.statemachine.state.EnumState<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- 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
,State<S,
,E> StateMachineReactiveLifecycle
A
State
implementation where state and event is enum based.- Author:
- Janne Valkealahti
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ConstructorDescriptionInstantiates a new enum state.EnumState
(S id, Collection<E> deferred) Instantiates a new enum state.EnumState
(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions) Instantiates a new enum state.EnumState
(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S, E> pseudoState) Instantiates a new enum state.EnumState
(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S, E> pseudoState, Collection<Region<S, E>> regions) Instantiates a new enum state.EnumState
(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S, E> pseudoState, StateMachine<S, E> submachine) Instantiates a new enum state.EnumState
(S id, PseudoState<S, E> pseudoState) Instantiates a new enum state. -
Method Summary
Methods inherited from class org.springframework.statemachine.state.ObjectState
entry, exit, toString
Methods inherited from class org.springframework.statemachine.state.AbstractSimpleState
getIds, getStates
Methods inherited from class org.springframework.statemachine.state.AbstractState
addActionListener, addStateListener, armTriggers, disarmTriggers, doPreStartReactively, doPreStopReactively, executeAction, getDeferredEvents, getEntryActions, getExitActions, getId, getPseudoState, getRegions, getStateActions, getSubmachine, getTriggers, handleStateDoOnComplete, isComposite, isOrthogonal, isSimple, isSubmachineState, notifyStateOnComplete, removeActionListener, removeStateListener, sendEvent, setStateDoActionPolicy, setStateDoActionPolicyTimeout, setTriggers, shouldDefer
Methods inherited from class org.springframework.statemachine.support.LifecycleObjectSupport
afterPropertiesSet, destroy, doDestroy, doPostStartReactively, doPostStopReactively, 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, wait, wait, wait
Methods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
EnumState
Instantiates a new enum state.- Parameters:
id
- the id
-
EnumState
Instantiates a new enum state.- Parameters:
id
- the idpseudoState
- the pseudo state
-
EnumState
Instantiates a new enum state.- Parameters:
id
- the iddeferred
- the deferred
-
EnumState
public EnumState(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions) Instantiates a new enum state.- Parameters:
id
- the iddeferred
- the deferredentryActions
- the entry actionsexitActions
- the exit actions
-
EnumState
public EnumState(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S, E> pseudoState) Instantiates a new enum state.- Parameters:
id
- the iddeferred
- the deferredentryActions
- the entry actionsexitActions
- the exit actionspseudoState
- the pseudo state
-
EnumState
public EnumState(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S, E> pseudoState, Collection<Region<S, E>> regions) Instantiates a new enum state.- Parameters:
id
- the iddeferred
- the deferredentryActions
- the entry actionsexitActions
- the exit actionspseudoState
- the pseudo stateregions
- the regions
-
EnumState
public EnumState(S id, Collection<E> deferred, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S, E> pseudoState, StateMachine<S, E> submachine) Instantiates a new enum state.- Parameters:
id
- the iddeferred
- the deferredentryActions
- the entry actionsexitActions
- the exit actionspseudoState
- the pseudo statesubmachine
- the submachine
-