Interface Transition<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Known Implementing Classes:
AbstractExternalTransition,AbstractInternalTransition,AbstractLocalTransition,AbstractTransition,DefaultExternalTransition,DefaultInternalTransition,DefaultLocalTransition,InitialTransition
public interface Transition<S,E>
Transition is something what a state machine associates with a state
changes.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddActionListener(ActionListener<S, E> listener) Adds the action listener.reactor.core.publisher.Mono<Void>executeTransitionActions(StateContext<S, E> context) Execute transition actions.Collection<Function<StateContext<S,E>, reactor.core.publisher.Mono<Void>>> Gets the transition actions.Function<StateContext<S,E>, reactor.core.publisher.Mono<Boolean>> getGuard()Gets the guard of this transition.getKind()Gets the transition kind.getName()Gets the name.Gets the security rule.Gets the source state of this transition.Gets the target state of this transition.Gets the transition trigger.voidremoveActionListener(ActionListener<S, E> listener) Removes the action listener.reactor.core.publisher.Mono<Boolean>transit(StateContext<S, E> context) Transit this transition with a give state context.
-
Method Details
-
transit
Transit this transition with a give state context.- Parameters:
context- the state context- Returns:
- Mono for completion with true, if transition happened, false otherwise
-
executeTransitionActions
Execute transition actions.- Parameters:
context- the state context- Returns:
- mono for completion
-
getSource
Gets the source state of this transition.- Returns:
- the source state
-
getTarget
Gets the target state of this transition.- Returns:
- the target state
-
getGuard
Function<StateContext<S,E>, getGuard()reactor.core.publisher.Mono<Boolean>> Gets the guard of this transition.- Returns:
- the guard
-
getActions
Collection<Function<StateContext<S,E>, getActions()reactor.core.publisher.Mono<Void>>> Gets the transition actions.- Returns:
- the transition actions
-
getTrigger
Gets the transition trigger.- Returns:
- the transition trigger
-
getKind
TransitionKind getKind()Gets the transition kind.- Returns:
- the transition kind
-
getSecurityRule
SecurityRule getSecurityRule()Gets the security rule.- Returns:
- the security rule
-
getName
String getName()Gets the name.- Returns:
- the name
-
addActionListener
Adds the action listener.- Parameters:
listener- the listener
-
removeActionListener
Removes the action listener.- Parameters:
listener- the listener
-