Class DefaultInternalTransitionConfigurer<S,E>
java.lang.Object
org.springframework.statemachine.config.common.annotation.AnnotationConfigurerAdapter<TransitionsData<S,E>,StateMachineTransitionConfigurer<S,E>,StateMachineTransitionBuilder<S,E>>
org.springframework.statemachine.config.configurers.AbstractTransitionConfigurer<S,E>
org.springframework.statemachine.config.configurers.DefaultInternalTransitionConfigurer<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
AnnotationConfigurer<TransitionsData<S,
,E>, StateMachineTransitionBuilder<S, E>> AnnotationConfigurerBuilder<StateMachineTransitionConfigurer<S,
,E>> InternalTransitionConfigurer<S,
,E> TransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E>
public class DefaultInternalTransitionConfigurer<S,E>
extends AbstractTransitionConfigurer<S,E>
implements InternalTransitionConfigurer<S,E>
Default implementation of a
InternalTransitionConfigurer
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSpecifyAction
for thisTransition
.SpecifyAction
for thisTransition
.actionFunction
(Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) SpecifyFunction
for thisTransition
.void
configure
(StateMachineTransitionBuilder<S, E> builder) Configure theAnnotationBuilder
by setting the necessary properties on theAnnotationBuilder
.Specify eventE
for thisTransition
which will be triggered by a event trigger.Specify aGuard
for thisTransition
.guardExpression
(String expression) Specify aGuard
backed by a SpEL expression for thisTransition
.Specify a name for thisTransition
.Specify a security expression for thisTransition
.secured
(String attributes, SecurityRule.ComparisonType match) Specify a security attributes for thisTransition
.Specify a source stateS
for thisTransition
.Specify a state this transition should belong to.timer
(long period) Specify that this transition is triggered by a time.timerOnce
(long period) Specify that this transition is triggered once by a time after a delay.Methods inherited from class org.springframework.statemachine.config.configurers.AbstractTransitionConfigurer
addAction, addAction, addActionFunction, getActions, getCount, getEvent, getGuard, getName, getPeriod, getSecurityRule, getSource, getState, getTarget, setCount, setEvent, setGuard, setGuardFunction, setName, setPeriod, setSecurityRule, setSecurityRule, setSource, setState, setTarget
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
-
DefaultInternalTransitionConfigurer
public DefaultInternalTransitionConfigurer()
-
-
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<TransitionsData<S,
E>, StateMachineTransitionConfigurer<S, E>, StateMachineTransitionBuilder<S, E>> - Parameters:
builder
- the builder- Throws:
Exception
- if error occurred
-
source
Description copied from interface:TransitionConfigurer
Specify a source stateS
for thisTransition
.- Specified by:
source
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
source
- the source stateS
- Returns:
- configurer for chaining
-
state
Description copied from interface:TransitionConfigurer
Specify a state this transition should belong to.- Specified by:
state
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
state
- the stateS
- Returns:
- configurer for chaining
-
event
Description copied from interface:TransitionConfigurer
Specify eventE
for thisTransition
which will be triggered by a event trigger.- Specified by:
event
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
event
- the event for transition- Returns:
- configurer for chaining
-
timer
Description copied from interface:TransitionConfigurer
Specify that this transition is triggered by a time.- Specified by:
timer
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
period
- timer period in millis- Returns:
- configurer for chaining
-
timerOnce
Description copied from interface:TransitionConfigurer
Specify that this transition is triggered once by a time after a delay.- Specified by:
timerOnce
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
period
- timer period in millis- Returns:
- configurer for chaining
-
action
Description copied from interface:TransitionConfigurer
SpecifyAction
for thisTransition
.- Specified by:
action
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
action
- the action- Returns:
- configurer for chaining
-
action
Description copied from interface:TransitionConfigurer
SpecifyAction
for thisTransition
.- Specified by:
action
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
action
- the actionerror
- action that will be called if any unexpected exception is thrown by the action.- Returns:
- configurer for chaining
-
actionFunction
public InternalTransitionConfigurer<S,E> actionFunction(Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Description copied from interface:TransitionConfigurer
SpecifyFunction
for thisTransition
.- Specified by:
actionFunction
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
action
- the function action- Returns:
- configurer for chaining
-
guard
Description copied from interface:TransitionConfigurer
Specify aGuard
for thisTransition
.- Specified by:
guard
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
guard
- the guard- Returns:
- configurer for chaining
-
guardExpression
Description copied from interface:TransitionConfigurer
Specify aGuard
backed by a SpEL expression for thisTransition
.- Specified by:
guardExpression
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
expression
- the SpEL expression- Returns:
- configurer for chaining
-
secured
public InternalTransitionConfigurer<S,E> secured(String attributes, SecurityRule.ComparisonType match) Description copied from interface:TransitionConfigurer
Specify a security attributes for thisTransition
.- Specified by:
secured
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
attributes
- the security attributesmatch
- the match type- Returns:
- configurer for chaining
-
secured
Description copied from interface:TransitionConfigurer
Specify a security expression for thisTransition
.- Specified by:
secured
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
expression
- the security expression- Returns:
- configurer for chaining
-
name
Description copied from interface:TransitionConfigurer
Specify a name for thisTransition
.- Specified by:
name
in interfaceTransitionConfigurer<InternalTransitionConfigurer<S,
E>, S, E> - Parameters:
name
- the name- Returns:
- configurer for chaining
-