S
- the type of stateE
- the type of eventpublic abstract class AbstractStateMachineFactory<S,E> extends LifecycleObjectSupport implements StateMachineFactory<S,E>, org.springframework.beans.factory.BeanNameAware
StateMachineFactory
implementation building StateMachine
s.Constructor and Description |
---|
AbstractStateMachineFactory(StateMachineModel<S,E> stateMachineModel)
Instantiates a new abstract state machine factory.
|
Modifier and Type | Method and Description |
---|---|
protected abstract RegionState<S,E> |
buildRegionStateInternal(S id,
java.util.Collection<Region<S,E>> regions,
java.util.Collection<E> deferred,
java.util.Collection<? extends Action<S,E>> entryActions,
java.util.Collection<? extends Action<S,E>> exitActions,
PseudoState<S,E> pseudoState) |
protected abstract State<S,E> |
buildStateInternal(S id,
java.util.Collection<E> deferred,
java.util.Collection<? extends Action<S,E>> entryActions,
java.util.Collection<? extends Action<S,E>> exitActions,
PseudoState<S,E> pseudoState) |
protected abstract StateMachine<S,E> |
buildStateMachineInternal(java.util.Collection<State<S,E>> states,
java.util.Collection<Transition<S,E>> transitions,
State<S,E> initialState,
Transition<S,E> initialTransition,
org.springframework.messaging.Message<E> initialEvent,
ExtendedState extendedState,
PseudoState<S,E> historyState,
java.lang.Boolean contextEventsEnabled,
org.springframework.beans.factory.BeanFactory beanFactory,
org.springframework.core.task.TaskExecutor taskExecutor,
org.springframework.scheduling.TaskScheduler taskScheduler,
java.lang.String beanName,
java.lang.String machineId) |
StateMachine<S,E> |
getStateMachine()
Build a new
StateMachine instance. |
StateMachine<S,E> |
getStateMachine(java.lang.String machineId)
Build a new
StateMachine instance
with a given machine id. |
void |
setBeanName(java.lang.String name) |
void |
setContextEventsEnabled(java.lang.Boolean contextEvents)
Instructs this factory to enable application context events.
|
void |
setHandleAutostartup(boolean handleAutostartup)
Instructs this factory to handle auto-start flag manually
by calling lifecycle start method.
|
afterPropertiesSet, destroy, doDestroy, doStart, doStop, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, onInit, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, start, stop, stop
public AbstractStateMachineFactory(StateMachineModel<S,E> stateMachineModel)
stateMachineModel
- the state machine modelpublic void setBeanName(java.lang.String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public StateMachine<S,E> getStateMachine()
StateMachineFactory
StateMachine
instance.getStateMachine
in interface StateMachineFactory<S,E>
public StateMachine<S,E> getStateMachine(java.lang.String machineId)
StateMachineFactory
StateMachine
instance
with a given machine id.getStateMachine
in interface StateMachineFactory<S,E>
machineId
- the machine idpublic void setHandleAutostartup(boolean handleAutostartup)
handleAutostartup
- the new handle autostartuppublic void setContextEventsEnabled(java.lang.Boolean contextEvents)
contextEvents
- the new context events enabledprotected abstract StateMachine<S,E> buildStateMachineInternal(java.util.Collection<State<S,E>> states, java.util.Collection<Transition<S,E>> transitions, State<S,E> initialState, Transition<S,E> initialTransition, org.springframework.messaging.Message<E> initialEvent, ExtendedState extendedState, PseudoState<S,E> historyState, java.lang.Boolean contextEventsEnabled, org.springframework.beans.factory.BeanFactory beanFactory, org.springframework.core.task.TaskExecutor taskExecutor, org.springframework.scheduling.TaskScheduler taskScheduler, java.lang.String beanName, java.lang.String machineId)
protected abstract State<S,E> buildStateInternal(S id, java.util.Collection<E> deferred, java.util.Collection<? extends Action<S,E>> entryActions, java.util.Collection<? extends Action<S,E>> exitActions, PseudoState<S,E> pseudoState)
protected abstract RegionState<S,E> buildRegionStateInternal(S id, java.util.Collection<Region<S,E>> regions, java.util.Collection<E> deferred, java.util.Collection<? extends Action<S,E>> entryActions, java.util.Collection<? extends Action<S,E>> exitActions, PseudoState<S,E> pseudoState)