Class ChoicePseudoState<S,E>
java.lang.Object
org.springframework.statemachine.state.ChoicePseudoState<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
PseudoState<S,
E>
Choice implementation of a
PseudoState
.- Author:
- Janne Valkealahti
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorDescriptionChoicePseudoState
(List<ChoicePseudoState.ChoiceStateData<S, E>> choices) Instantiates a new choice pseudo state. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPseudoStateListener
(PseudoStateListener<S, E> listener) Registers a newPseudoStateListener
.entry
(StateContext<S, E> context) Initiate an entry sequence for the state and return a next state where state machine should go.reactor.core.publisher.Mono<Void>
exit
(StateContext<S, E> context) Initiate an exit sequence for the state.getKind()
Gets the pseudostate kind.void
setPseudoStateListeners
(List<PseudoStateListener<S, E>> listeners) Registers a newPseudoStateListener
s.
-
Constructor Details
-
ChoicePseudoState
Instantiates a new choice pseudo state.- Parameters:
choices
- the choices
-
-
Method Details
-
getKind
Description copied from interface:PseudoState
Gets the pseudostate kind.- Specified by:
getKind
in interfacePseudoState<S,
E> - Returns:
- the pseudostate kind
-
entry
Description copied from interface:PseudoState
Initiate an entry sequence for the state and return a next state where state machine should go.- Specified by:
entry
in interfacePseudoState<S,
E> - Parameters:
context
- the context- Returns:
- the next state or null
-
exit
Description copied from interface:PseudoState
Initiate an exit sequence for the state.- Specified by:
exit
in interfacePseudoState<S,
E> - Parameters:
context
- the context- Returns:
- mono of completion
-
addPseudoStateListener
Description copied from interface:PseudoState
Registers a newPseudoStateListener
.- Specified by:
addPseudoStateListener
in interfacePseudoState<S,
E> - Parameters:
listener
- the listener
-
setPseudoStateListeners
Description copied from interface:PseudoState
Registers a newPseudoStateListener
s. Clears all existing listeners.- Specified by:
setPseudoStateListeners
in interfacePseudoState<S,
E> - Parameters:
listeners
- the listeners
-