Interface PseudoState<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Known Implementing Classes:
AbstractPseudoState
,ChoicePseudoState
,DefaultPseudoState
,EntryPseudoState
,ExitPseudoState
,ForkPseudoState
,HistoryPseudoState
,JoinPseudoState
,JunctionPseudoState
public interface PseudoState<S,E>
A
PseudoState
is an abstraction that encompasses different types of
transient states or vertices in the state machine.
Pseudostates are typically used to connect multiple transitions into more complex state transitions paths. For example, by combining a transition entering a fork pseudostate with a set of transitions exiting the fork pseudostate, we get a compound transition that leads to a set of orthogonal target states.
-
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.
-
Method Details
-
getKind
PseudoStateKind getKind()Gets the pseudostate kind.- Returns:
- the pseudostate kind
-
entry
Initiate an entry sequence for the state and return a next state where state machine should go.- Parameters:
context
- the context- Returns:
- the next state or null
-
exit
Initiate an exit sequence for the state.- Parameters:
context
- the context- Returns:
- mono of completion
-
addPseudoStateListener
Registers a newPseudoStateListener
.- Parameters:
listener
- the listener
-
setPseudoStateListeners
Registers a newPseudoStateListener
s. Clears all existing listeners.- Parameters:
listeners
- the listeners
-