Class DefaultExternalTransitionConfigurer<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.DefaultExternalTransitionConfigurer<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>> ExternalTransitionConfigurer<S,,E> TransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E>
public class DefaultExternalTransitionConfigurer<S,E>
extends AbstractTransitionConfigurer<S,E>
implements ExternalTransitionConfigurer<S,E>
Default implementation of a
ExternalTransitionConfigurer.- Author:
- Janne Valkealahti
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifyActionfor thisTransition.SpecifyActionfor thisTransition.actionFunction(Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) SpecifyFunctionfor thisTransition.voidconfigure(StateMachineTransitionBuilder<S, E> builder) Configure theAnnotationBuilderby setting the necessary properties on theAnnotationBuilder.Specify eventEfor thisTransitionwhich will be triggered by a event trigger.Specify aGuardfor thisTransition.guardExpression(String expression) Specify aGuardbacked 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 stateSfor thisTransition.Specify a state this transition should belong to.Specify a target stateSfor thisTransition.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, setTargetMethods 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
-
DefaultExternalTransitionConfigurer
public DefaultExternalTransitionConfigurer()
-
-
Method Details
-
configure
Description copied from interface:AnnotationConfigurerConfigure theAnnotationBuilderby setting the necessary properties on theAnnotationBuilder.- Specified by:
configurein interfaceAnnotationConfigurer<S,E> - Overrides:
configurein classAnnotationConfigurerAdapter<TransitionsData<S,E>, StateMachineTransitionConfigurer<S, E>, StateMachineTransitionBuilder<S, E>> - Parameters:
builder- the builder- Throws:
Exception- if error occurred
-
source
Description copied from interface:TransitionConfigurerSpecify a source stateSfor thisTransition.- Specified by:
sourcein interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
source- the source stateS- Returns:
- configurer for chaining
-
target
Description copied from interface:ExternalTransitionConfigurerSpecify a target stateSfor thisTransition.- Specified by:
targetin interfaceExternalTransitionConfigurer<S,E> - Parameters:
target- the target stateS- Returns:
- configurer for chaining
-
state
Description copied from interface:TransitionConfigurerSpecify a state this transition should belong to.- Specified by:
statein interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
state- the stateS- Returns:
- configurer for chaining
-
event
Description copied from interface:TransitionConfigurerSpecify eventEfor thisTransitionwhich will be triggered by a event trigger.- Specified by:
eventin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
event- the event for transition- Returns:
- configurer for chaining
-
timer
Description copied from interface:TransitionConfigurerSpecify that this transition is triggered by a time.- Specified by:
timerin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
period- timer period in millis- Returns:
- configurer for chaining
-
timerOnce
Description copied from interface:TransitionConfigurerSpecify that this transition is triggered once by a time after a delay.- Specified by:
timerOncein interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
period- timer period in millis- Returns:
- configurer for chaining
-
action
Description copied from interface:TransitionConfigurerSpecifyActionfor thisTransition.- Specified by:
actionin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
action- the action- Returns:
- configurer for chaining
-
action
Description copied from interface:TransitionConfigurerSpecifyActionfor thisTransition.- Specified by:
actionin interfaceTransitionConfigurer<ExternalTransitionConfigurer<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 ExternalTransitionConfigurer<S,E> actionFunction(Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Description copied from interface:TransitionConfigurerSpecifyFunctionfor thisTransition.- Specified by:
actionFunctionin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
action- the function action- Returns:
- configurer for chaining
-
guard
Description copied from interface:TransitionConfigurerSpecify aGuardfor thisTransition.- Specified by:
guardin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
guard- the guard- Returns:
- configurer for chaining
-
guardExpression
Description copied from interface:TransitionConfigurerSpecify aGuardbacked by a SpEL expression for thisTransition.- Specified by:
guardExpressionin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
expression- the SpEL expression- Returns:
- configurer for chaining
-
secured
public ExternalTransitionConfigurer<S,E> secured(String attributes, SecurityRule.ComparisonType match) Description copied from interface:TransitionConfigurerSpecify a security attributes for thisTransition.- Specified by:
securedin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
attributes- the security attributesmatch- the match type- Returns:
- configurer for chaining
-
secured
Description copied from interface:TransitionConfigurerSpecify a security expression for thisTransition.- Specified by:
securedin interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
expression- the security expression- Returns:
- configurer for chaining
-
name
Description copied from interface:TransitionConfigurerSpecify a name for thisTransition.- Specified by:
namein interfaceTransitionConfigurer<ExternalTransitionConfigurer<S,E>, S, E> - Parameters:
name- the name- Returns:
- configurer for chaining
-