S
- the type of stateE
- the type of eventpublic class DefaultConfigurationConfigurer<S,E> extends AnnotationConfigurerAdapter<ConfigurationData<S,E>,StateMachineConfigurationConfigurer<S,E>,StateMachineConfigurationBuilder<S,E>> implements ConfigurationConfigurer<S,E>
ConfigurationConfigurer
.Constructor and Description |
---|
DefaultConfigurationConfigurer() |
Modifier and Type | Method and Description |
---|---|
ConfigurationConfigurer<S,E> |
autoStartup(boolean autoStart)
Specify if state machine should be started automatically.
|
ConfigurationConfigurer<S,E> |
beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Specify a
BeanFactory . |
void |
configure(StateMachineConfigurationBuilder<S,E> builder)
Configure the
AnnotationBuilder by setting the necessary properties
on the AnnotationBuilder . |
ConfigurationConfigurer<S,E> |
listener(StateMachineListener<S,E> listener)
Specify a
StateMachineListener to be registered
with a state machine. |
ConfigurationConfigurer<S,E> |
machineId(java.lang.String id)
Specify a machine identifier.
|
ConfigurationConfigurer<S,E> |
stateDoActionPolicy(StateDoActionPolicy stateDoActionPolicy)
Specify a
StateDoActionPolicy . |
ConfigurationConfigurer<S,E> |
stateDoActionPolicyTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Specify a timeout used with
StateDoActionPolicy . |
ConfigurationConfigurer<S,E> |
taskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Specify a
TaskExecutor . |
ConfigurationConfigurer<S,E> |
taskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
Specify a
TaskScheduler . |
ConfigurationConfigurer<S,E> |
transitionConflictPolicy(TransitionConflictPolicy transitionConflightPolicy)
Specify a
TransitionConflictPolicy . |
addObjectPostProcessor, and, getBuilder, init, isAssignable, setBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and
public void configure(StateMachineConfigurationBuilder<S,E> builder) throws java.lang.Exception
AnnotationConfigurer
AnnotationBuilder
by setting the necessary properties
on the AnnotationBuilder
.configure
in interface AnnotationConfigurer<ConfigurationData<S,E>,StateMachineConfigurationBuilder<S,E>>
configure
in class AnnotationConfigurerAdapter<ConfigurationData<S,E>,StateMachineConfigurationConfigurer<S,E>,StateMachineConfigurationBuilder<S,E>>
builder
- the builderjava.lang.Exception
- if error occurredpublic ConfigurationConfigurer<S,E> machineId(java.lang.String id)
ConfigurationConfigurer
machineId
in interface ConfigurationConfigurer<S,E>
id
- the machine identifierRegion.getId()
public ConfigurationConfigurer<S,E> beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
ConfigurationConfigurer
BeanFactory
.beanFactory
in interface ConfigurationConfigurer<S,E>
beanFactory
- the bean factorypublic ConfigurationConfigurer<S,E> taskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
ConfigurationConfigurer
TaskExecutor
.taskExecutor
in interface ConfigurationConfigurer<S,E>
taskExecutor
- the task executorpublic ConfigurationConfigurer<S,E> taskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
ConfigurationConfigurer
TaskScheduler
.taskScheduler
in interface ConfigurationConfigurer<S,E>
taskScheduler
- the task schedulerpublic ConfigurationConfigurer<S,E> autoStartup(boolean autoStart)
ConfigurationConfigurer
autoStartup
in interface ConfigurationConfigurer<S,E>
autoStart
- the autoStartup flagpublic ConfigurationConfigurer<S,E> listener(StateMachineListener<S,E> listener)
ConfigurationConfigurer
StateMachineListener
to be registered
with a state machine. This method can be called multiple times
to register multiple listeners.listener
in interface ConfigurationConfigurer<S,E>
listener
- the listener to registerpublic ConfigurationConfigurer<S,E> transitionConflictPolicy(TransitionConflictPolicy transitionConflightPolicy)
ConfigurationConfigurer
TransitionConflictPolicy
. Default to TransitionConflictPolicy.CHILD
.transitionConflictPolicy
in interface ConfigurationConfigurer<S,E>
transitionConflightPolicy
- the transition conflict policypublic ConfigurationConfigurer<S,E> stateDoActionPolicy(StateDoActionPolicy stateDoActionPolicy)
ConfigurationConfigurer
StateDoActionPolicy
. Defaults to StateDoActionPolicy.IMMEDIATE_CANCEL
.stateDoActionPolicy
in interface ConfigurationConfigurer<S,E>
stateDoActionPolicy
- the state do action policypublic ConfigurationConfigurer<S,E> stateDoActionPolicyTimeout(long timeout, java.util.concurrent.TimeUnit unit)
ConfigurationConfigurer
StateDoActionPolicy
.stateDoActionPolicyTimeout
in interface ConfigurationConfigurer<S,E>
timeout
- the timeoutunit
- the time unit