Class DefaultConfigurationConfigurer<S,E>
java.lang.Object
org.springframework.statemachine.config.common.annotation.AnnotationConfigurerAdapter<ConfigurationData<S,E>,StateMachineConfigurationConfigurer<S,E>,StateMachineConfigurationBuilder<S,E>>
org.springframework.statemachine.config.configurers.DefaultConfigurationConfigurer<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
AnnotationConfigurer<ConfigurationData<S,
,E>, StateMachineConfigurationBuilder<S, E>> AnnotationConfigurerBuilder<StateMachineConfigurationConfigurer<S,
,E>> ConfigurationConfigurer<S,
E>
public class DefaultConfigurationConfigurer<S,E>
extends AnnotationConfigurerAdapter<ConfigurationData<S,E>,StateMachineConfigurationConfigurer<S,E>,StateMachineConfigurationBuilder<S,E>>
implements ConfigurationConfigurer<S,E>
Default implementation of a
ConfigurationConfigurer
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoStartup
(boolean autoStart) Specify if state machine should be started automatically.beanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) Specify aBeanFactory
.void
configure
(StateMachineConfigurationBuilder<S, E> builder) Configure theAnnotationBuilder
by setting the necessary properties on theAnnotationBuilder
.listener
(StateMachineListener<S, E> listener) Specify aStateMachineListener
to be registered with a state machine.Specify a machine identifier.regionExecutionPolicy
(RegionExecutionPolicy regionExecutionPolicy) Specify aRegionExecutionPolicy
.stateDoActionPolicy
(StateDoActionPolicy stateDoActionPolicy) Specify aStateDoActionPolicy
.stateDoActionPolicyTimeout
(long timeout, TimeUnit unit) Specify a timeout used withStateDoActionPolicy
.transitionConflictPolicy
(TransitionConflictPolicy transitionConflightPolicy) Specify aTransitionConflictPolicy
.Methods inherited from class org.springframework.statemachine.config.common.annotation.AnnotationConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, isAssignable, setBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.statemachine.config.common.annotation.AnnotationConfigurerBuilder
and
-
Constructor Details
-
DefaultConfigurationConfigurer
public DefaultConfigurationConfigurer()
-
-
Method Details
-
configure
Description copied from interface:AnnotationConfigurer
Configure theAnnotationBuilder
by setting the necessary properties on theAnnotationBuilder
.- Specified by:
configure
in interfaceAnnotationConfigurer<S,
E> - Overrides:
configure
in classAnnotationConfigurerAdapter<ConfigurationData<S,
E>, StateMachineConfigurationConfigurer<S, E>, StateMachineConfigurationBuilder<S, E>> - Parameters:
builder
- the builder- Throws:
Exception
- if error occurred
-
machineId
Description copied from interface:ConfigurationConfigurer
Specify a machine identifier.- Specified by:
machineId
in interfaceConfigurationConfigurer<S,
E> - Parameters:
id
- the machine identifier- Returns:
- configurer for chaining
- See Also:
-
beanFactory
public ConfigurationConfigurer<S,E> beanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Description copied from interface:ConfigurationConfigurer
Specify aBeanFactory
.- Specified by:
beanFactory
in interfaceConfigurationConfigurer<S,
E> - Parameters:
beanFactory
- the bean factory- Returns:
- configurer for chaining
-
autoStartup
Description copied from interface:ConfigurationConfigurer
Specify if state machine should be started automatically. On default state machine is not started automatically.- Specified by:
autoStartup
in interfaceConfigurationConfigurer<S,
E> - Parameters:
autoStart
- the autoStartup flag- Returns:
- configurer for chaining
-
listener
Description copied from interface:ConfigurationConfigurer
Specify aStateMachineListener
to be registered with a state machine. This method can be called multiple times to register multiple listeners.- Specified by:
listener
in interfaceConfigurationConfigurer<S,
E> - Parameters:
listener
- the listener to register- Returns:
- the configuration configurer
-
transitionConflictPolicy
public ConfigurationConfigurer<S,E> transitionConflictPolicy(TransitionConflictPolicy transitionConflightPolicy) Description copied from interface:ConfigurationConfigurer
Specify aTransitionConflictPolicy
. Default toTransitionConflictPolicy.CHILD
.- Specified by:
transitionConflictPolicy
in interfaceConfigurationConfigurer<S,
E> - Parameters:
transitionConflightPolicy
- the transition conflict policy- Returns:
- the configuration configurer
-
stateDoActionPolicy
Description copied from interface:ConfigurationConfigurer
Specify aStateDoActionPolicy
. Defaults toStateDoActionPolicy.IMMEDIATE_CANCEL
.- Specified by:
stateDoActionPolicy
in interfaceConfigurationConfigurer<S,
E> - Parameters:
stateDoActionPolicy
- the state do action policy- Returns:
- the configuration configurer
-
stateDoActionPolicyTimeout
Description copied from interface:ConfigurationConfigurer
Specify a timeout used withStateDoActionPolicy
.- Specified by:
stateDoActionPolicyTimeout
in interfaceConfigurationConfigurer<S,
E> - Parameters:
timeout
- the timeoutunit
- the time unit- Returns:
- the configuration configurer
-
regionExecutionPolicy
public ConfigurationConfigurer<S,E> regionExecutionPolicy(RegionExecutionPolicy regionExecutionPolicy) Description copied from interface:ConfigurationConfigurer
Specify aRegionExecutionPolicy
. Default toRegionExecutionPolicy.SEQUENTIAL
.- Specified by:
regionExecutionPolicy
in interfaceConfigurationConfigurer<S,
E> - Parameters:
regionExecutionPolicy
- the region execution policy- Returns:
- the configuration configurer
-