Class AbstractStateMachineConfigurerAdapter<S,E>
java.lang.Object
org.springframework.statemachine.config.AbstractStateMachineConfigurerAdapter<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
StateMachineConfigurer<S,
,E> AnnotationConfigurer<StateMachineConfig<S,
E>, StateMachineConfigBuilder<S, E>>
- Direct Known Subclasses:
StateMachineConfigurerAdapter
public abstract class AbstractStateMachineConfigurerAdapter<S,E>
extends Object
implements StateMachineConfigurer<S,E>
Adapter base implementation for
StateMachineConfigurer
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(StateMachineConfigBuilder<S, E> config) Configure theAnnotationBuilder
by setting the necessary properties on theAnnotationBuilder
.void
configure
(StateMachineConfigurationConfigurer<S, E> config) Callback forStateMachineConfigurationConfigurer
.void
configure
(StateMachineModelConfigurer<S, E> model) Callback forStateMachineModelConfigurer
.void
configure
(StateMachineStateConfigurer<S, E> states) Callback forStateMachineStateConfigurer
.void
configure
(StateMachineTransitionConfigurer<S, E> transitions) Callback forStateMachineTransitionConfigurer
.protected final StateMachineConfigurationBuilder<S,
E> protected final StateMachineModelBuilder<S,
E> protected final StateMachineStateBuilder<S,
E> protected final StateMachineTransitionBuilder<S,
E> final void
init
(StateMachineConfigBuilder<S, E> config) Initialise theAnnotationBuilder
.boolean
isAssignable
(AnnotationBuilder<StateMachineConfig<S, E>> builder)
-
Constructor Details
-
AbstractStateMachineConfigurerAdapter
public AbstractStateMachineConfigurerAdapter()
-
-
Method Details
-
init
Description copied from interface:AnnotationConfigurer
Initialise theAnnotationBuilder
. Here only shared state should be created and modified, but not properties on theAnnotationBuilder
used for building the object. This ensures that theAnnotationConfigurer.configure(AnnotationBuilder)
method uses the correct shared objects when building.- Specified by:
init
in interfaceAnnotationConfigurer<S,
E> - Parameters:
config
- the builder- Throws:
Exception
- if error occurred
-
configure
Description copied from interface:AnnotationConfigurer
Configure theAnnotationBuilder
by setting the necessary properties on theAnnotationBuilder
.- Specified by:
configure
in interfaceAnnotationConfigurer<S,
E> - Parameters:
config
- the builder- Throws:
Exception
- if error occurred
-
configure
Description copied from interface:StateMachineConfigurer
Callback forStateMachineModelConfigurer
.- Specified by:
configure
in interfaceStateMachineConfigurer<S,
E> - Parameters:
model
- theStateMachineModelConfigurer
- Throws:
Exception
- if configuration error happens
-
configure
Description copied from interface:StateMachineConfigurer
Callback forStateMachineConfigurationConfigurer
.- Specified by:
configure
in interfaceStateMachineConfigurer<S,
E> - Parameters:
config
- theStateMachineConfigurationConfigurer
- Throws:
Exception
- if configuration error happens
-
configure
Description copied from interface:StateMachineConfigurer
Callback forStateMachineStateConfigurer
.- Specified by:
configure
in interfaceStateMachineConfigurer<S,
E> - Parameters:
states
- theStateMachineStateConfigurer
- Throws:
Exception
- if configuration error happens
-
configure
Description copied from interface:StateMachineConfigurer
Callback forStateMachineTransitionConfigurer
.- Specified by:
configure
in interfaceStateMachineConfigurer<S,
E> - Parameters:
transitions
- theStateMachineTransitionConfigurer
- Throws:
Exception
- if configuration error happens
-
isAssignable
- Specified by:
isAssignable
in interfaceAnnotationConfigurer<S,
E>
-
getStateMachineModelBuilder
- Throws:
Exception
-
getStateMachineTransitionBuilder
protected final StateMachineTransitionBuilder<S,E> getStateMachineTransitionBuilder() throws Exception- Throws:
Exception
-
getStateMachineStateBuilder
- Throws:
Exception
-
getStateMachineConfigurationBuilder
protected final StateMachineConfigurationBuilder<S,E> getStateMachineConfigurationBuilder() throws Exception- Throws:
Exception
-