Class DefaultStateConfigurer<S,E>
java.lang.Object
org.springframework.statemachine.config.common.annotation.AnnotationConfigurerAdapter<StatesData<S,E>,StateMachineStateConfigurer<S,E>,StateMachineStateBuilder<S,E>>
org.springframework.statemachine.config.configurers.DefaultStateConfigurer<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
AnnotationConfigurer<StatesData<S,,E>, StateMachineStateBuilder<S, E>> AnnotationConfigurerBuilder<StateMachineStateConfigurer<S,,E>> StateConfigurer<S,E>
public class DefaultStateConfigurer<S,E>
extends AnnotationConfigurerAdapter<StatesData<S,E>,StateMachineStateConfigurer<S,E>,StateMachineStateBuilder<S,E>>
implements StateConfigurer<S,E>
Default implementation of a
StateConfigurer.- Author:
- Janne Valkealahti
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.statemachine.config.configurers.StateConfigurer
StateConfigurer.History -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecify a stateSto be choice pseudo state.voidconfigure(StateMachineStateBuilder<S, E> builder) Configure theAnnotationBuilderby setting the necessary properties on theAnnotationBuilder.Specify a stateSto be end state.Specify a stateSto be entrypoint pseudo state.Specify a stateSto be exitpoint pseudo state.Specify a stateSto be fork pseudo state.history(S history, StateConfigurer.History type) Specify a stateSto be history pseudo state.Specify a initial stateS.Specify a initial stateSwith anActionto be executed with it.Specify a stateSto be join pseudo state.Specify a stateSto be junction pseudo state.Specify a states configured by this configurer instance to be substates of stateS.Specify a region for these states configured by this configurer instance.Specify a stateS.Specify a stateSwith a deferred eventsE.Specify a stateSwith stateActions.state(S state, Collection<? extends Action<S, E>> entryActions, Collection<? extends Action<S, E>> exitActions) Specify a stateSwith entry and exitActions.Specify a stateSwith stateAction.Specify a stateSwith entry and exitAction.state(S state, StateMachineFactory<S, E> stateMachineFactory) Specify a stateSand its relation with a given machine as substate machine factory.state(S state, StateMachine<S, E> stateMachine) Specify a stateSand its relation with a given machine as substate machine.Specify a stateSwith state behaviourAction.stateDoFunction(S state, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> stateAction) Specify a stateSwith state behaviourFunction.stateEntry(S state, Action<S, E> action) Specify a stateSwith state entryAction.stateEntryFunction(S state, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Specify a stateSwith state entryFunction.Specify a stateSwith state exitAction.stateExitFunction(S state, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Specify a stateSwith state exitFunction.Specify a statesS.Methods inherited from class org.springframework.statemachine.config.common.annotation.AnnotationConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, isAssignable, setBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.statemachine.config.common.annotation.AnnotationConfigurerBuilder
and
-
Constructor Details
-
DefaultStateConfigurer
public DefaultStateConfigurer()
-
-
Method Details
-
configure
Description copied from interface:AnnotationConfigurerConfigure theAnnotationBuilderby setting the necessary properties on theAnnotationBuilder.- Specified by:
configurein interfaceAnnotationConfigurer<S,E> - Overrides:
configurein classAnnotationConfigurerAdapter<StatesData<S,E>, StateMachineStateConfigurer<S, E>, StateMachineStateBuilder<S, E>> - Parameters:
builder- the builder- Throws:
Exception- if error occurred
-
initial
Description copied from interface:StateConfigurerSpecify a initial stateS.- Specified by:
initialin interfaceStateConfigurer<S,E> - Parameters:
initial- the initial state- Returns:
- configurer for chaining
-
initial
Description copied from interface:StateConfigurerSpecify a initial stateSwith anActionto be executed with it. Action can be i.e. used to init extended variables.- Specified by:
initialin interfaceStateConfigurer<S,E> - Parameters:
initial- the initial stateaction- the action- Returns:
- configurer for chaining
-
parent
Description copied from interface:StateConfigurerSpecify a states configured by this configurer instance to be substates of stateS.- Specified by:
parentin interfaceStateConfigurer<S,E> - Parameters:
state- the parent state- Returns:
- configurer for chaining
-
region
Description copied from interface:StateConfigurerSpecify a region for these states configured by this configurer instance.- Specified by:
regionin interfaceStateConfigurer<S,E> - Parameters:
id- the region id- Returns:
- configurer for chaining
-
end
Description copied from interface:StateConfigurerSpecify a stateSto be end state. This method can be called for each state to be marked as end state.- Specified by:
endin interfaceStateConfigurer<S,E> - Parameters:
end- the end state- Returns:
- configurer for chaining
-
state
Description copied from interface:StateConfigurerSpecify a stateS.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the state- Returns:
- configurer for chaining
-
state
Description copied from interface:StateConfigurerSpecify a stateSand its relation with a given machine as substate machine.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the statestateMachine- the submachine- Returns:
- configurer for chaining
-
state
Description copied from interface:StateConfigurerSpecify a stateSand its relation with a given machine as substate machine factory.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the statestateMachineFactory- the submachine factory- Returns:
- configurer for chaining
-
state
Description copied from interface:StateConfigurerSpecify a stateSwith stateActions.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the statestateActions- the state actions- Returns:
- configurer for chaining
-
state
Description copied from interface:StateConfigurerSpecify a stateSwith stateAction.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the statestateAction- the state action- Returns:
- configurer for chaining
-
stateDo
Description copied from interface:StateConfigurerSpecify a stateSwith state behaviourAction. Currently synonym forStateConfigurer.state(Object, Action).- Specified by:
stateDoin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state action- Returns:
- configurer for chaining
- See Also:
-
stateDoFunction
public StateConfigurer<S,E> stateDoFunction(S state, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> stateAction) Description copied from interface:StateConfigurerSpecify a stateSwith state behaviourFunction.- Specified by:
stateDoFunctionin interfaceStateConfigurer<S,E> - Parameters:
state- the statestateAction- the state action- Returns:
- configurer for chaining
-
stateEntryFunction
public StateConfigurer<S,E> stateEntryFunction(S state, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Description copied from interface:StateConfigurerSpecify a stateSwith state entryFunction.- Specified by:
stateEntryFunctionin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state action- Returns:
- configurer for chaining
-
stateExitFunction
public StateConfigurer<S,E> stateExitFunction(S state, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Description copied from interface:StateConfigurerSpecify a stateSwith state exitFunction.- Specified by:
stateExitFunctionin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state action- Returns:
- configurer for chaining
-
stateDo
Description copied from interface:StateConfigurer- Specified by:
stateDoin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state actionerror- action that will be called if any unexpected exception is thrown by the action.- Returns:
- configurer for chaining
-
state
public StateConfigurer<S,E> state(S state, Collection<? extends Action<S, E>> entryActions, Collection<? extends Action<S, E>> exitActions) Description copied from interface:StateConfigurerSpecify a stateSwith entry and exitActions.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the stateentryActions- the state entry actionsexitActions- the state exit actions- Returns:
- configurer for chaining
-
state
Description copied from interface:StateConfigurerSpecify a stateSwith entry and exitAction.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the stateentryAction- the state entry actionexitAction- the state exit action- Returns:
- configurer for chaining
-
stateEntry
Description copied from interface:StateConfigurerSpecify a stateSwith state entryAction. Currently synonym forStateConfigurer.state(Object, Action, Action)with no exit action.- Specified by:
stateEntryin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state entry action- Returns:
- configurer for chaining
- See Also:
-
stateEntry
Description copied from interface:StateConfigurerSpecify a stateSwith state entryActionand errorActioncallback. Currently synonym forStateConfigurer.state(Object, Action, Action)with no exit action.- Specified by:
stateEntryin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state entry actionerror- action that will be called if any unexpected exception is thrown by the action.- Returns:
- configurer for chaining
- See Also:
-
stateExit
Description copied from interface:StateConfigurerSpecify a stateSwith state exitAction. Currently synonym forStateConfigurer.state(Object, Action, Action)with no entry action.- Specified by:
stateExitin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state exit action- Returns:
- configurer for chaining
- See Also:
-
stateExit
Description copied from interface:StateConfigurerSpecify a stateSwith state exitActionand errorActioncallback. Currently synonym forStateConfigurer.state(Object, Action, Action)with no entry action.- Specified by:
stateExitin interfaceStateConfigurer<S,E> - Parameters:
state- the stateaction- the state entry actionerror- action that will be called if any unexpected exception is thrown by the action.- Returns:
- configurer for chaining
- See Also:
-
state
Description copied from interface:StateConfigurerSpecify a stateSwith a deferred eventsE.- Specified by:
statein interfaceStateConfigurer<S,E> - Parameters:
state- the statedeferred- the deferred events- Returns:
- configurer for chaining
-
states
Description copied from interface:StateConfigurerSpecify a statesS.- Specified by:
statesin interfaceStateConfigurer<S,E> - Parameters:
states- the states- Returns:
- configurer for chaining
-
choice
Description copied from interface:StateConfigurerSpecify a stateSto be choice pseudo state.- Specified by:
choicein interfaceStateConfigurer<S,E> - Parameters:
choice- the choice pseudo state- Returns:
- configurer for chaining
-
junction
Description copied from interface:StateConfigurerSpecify a stateSto be junction pseudo state.- Specified by:
junctionin interfaceStateConfigurer<S,E> - Parameters:
junction- the junction pseudo state- Returns:
- configurer for chaining
-
fork
Description copied from interface:StateConfigurerSpecify a stateSto be fork pseudo state.- Specified by:
forkin interfaceStateConfigurer<S,E> - Parameters:
fork- the fork pseudo state- Returns:
- configurer for chaining
-
join
Description copied from interface:StateConfigurerSpecify a stateSto be join pseudo state.- Specified by:
joinin interfaceStateConfigurer<S,E> - Parameters:
join- the join pseudo state- Returns:
- configurer for chaining
-
history
Description copied from interface:StateConfigurerSpecify a stateSto be history pseudo state.- Specified by:
historyin interfaceStateConfigurer<S,E> - Parameters:
history- the history pseudo statetype- the history pseudo state type- Returns:
- configurer for chaining
-
entry
Description copied from interface:StateConfigurerSpecify a stateSto be entrypoint pseudo state.- Specified by:
entryin interfaceStateConfigurer<S,E> - Parameters:
entry- the entrypoint pseudo state- Returns:
- configurer for chaining
-
exit
Description copied from interface:StateConfigurerSpecify a stateSto be exitpoint pseudo state.- Specified by:
exitin interfaceStateConfigurer<S,E> - Parameters:
exit- the exitpoint pseudo state- Returns:
- configurer for chaining
-