Class InitialTransition<S,E>
java.lang.Object
org.springframework.statemachine.transition.AbstractTransition<S,E>
org.springframework.statemachine.transition.InitialTransition<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
Transition<S,E>
Transition used during a state machine start.-
Field Summary
Fields inherited from class org.springframework.statemachine.transition.AbstractTransition
actions, target -
Constructor Summary
ConstructorsConstructorDescriptionInitialTransition(State<S, E> target) Instantiates a new initial transition.InitialTransition(State<S, E> target, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> actions) Instantiates a new initial transition.InitialTransition(State<S, E> target, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Instantiates a new initial transition. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Boolean>transit(StateContext<S, E> context) Transit this transition with a give state context.Methods inherited from class org.springframework.statemachine.transition.AbstractTransition
addActionListener, executeTransitionActions, getActions, getGuard, getKind, getName, getSecurityRule, getSource, getTarget, getTrigger, removeActionListener, toString
-
Constructor Details
-
InitialTransition
Instantiates a new initial transition.- Parameters:
target- the target
-
InitialTransition
public InitialTransition(State<S, E> target, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action) Instantiates a new initial transition.- Parameters:
target- the targetaction- the action
-
InitialTransition
public InitialTransition(State<S, E> target, Collection<Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>>> actions) Instantiates a new initial transition.- Parameters:
target- the targetactions- the actions
-
-
Method Details
-
transit
Description copied from interface:TransitionTransit this transition with a give state context.- Specified by:
transitin interfaceTransition<S,E> - Overrides:
transitin classAbstractTransition<S,E> - Parameters:
context- the state context- Returns:
- Mono for completion with true, if transition happened, false otherwise
-