S - the type of stateE - the type of eventpublic class ChoicePseudoState<S,E> extends java.lang.Object implements PseudoState<S,E>
PseudoState.| Modifier and Type | Class and Description |
|---|---|
static class |
ChoicePseudoState.ChoiceStateData<S,E>
|
| Constructor and Description |
|---|
ChoicePseudoState(java.util.List<ChoicePseudoState.ChoiceStateData<S,E>> choices)
Instantiates a new choice pseudo state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPseudoStateListener(PseudoStateListener<S,E> listener)
Registers a new
PseudoStateListener. |
reactor.core.publisher.Mono<State<S,E>> |
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<java.lang.Void> |
exit(StateContext<S,E> context)
Initiate an exit sequence for the state.
|
PseudoStateKind |
getKind()
Gets the pseudostate kind.
|
void |
setPseudoStateListeners(java.util.List<PseudoStateListener<S,E>> listeners)
Registers a new
PseudoStateListeners. |
public ChoicePseudoState(java.util.List<ChoicePseudoState.ChoiceStateData<S,E>> choices)
choices - the choicespublic PseudoStateKind getKind()
PseudoStategetKind in interface PseudoState<S,E>public reactor.core.publisher.Mono<State<S,E>> entry(StateContext<S,E> context)
PseudoStateentry in interface PseudoState<S,E>context - the contextpublic reactor.core.publisher.Mono<java.lang.Void> exit(StateContext<S,E> context)
PseudoStateexit in interface PseudoState<S,E>context - the contextpublic void addPseudoStateListener(PseudoStateListener<S,E> listener)
PseudoStatePseudoStateListener.addPseudoStateListener in interface PseudoState<S,E>listener - the listenerpublic void setPseudoStateListeners(java.util.List<PseudoStateListener<S,E>> listeners)
PseudoStatePseudoStateListeners. Clears all
existing listeners.setPseudoStateListeners in interface PseudoState<S,E>listeners - the listeners