Class AbstractPseudoState<S,E>
java.lang.Object
org.springframework.statemachine.state.AbstractPseudoState<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
PseudoState<S,
E>
- Direct Known Subclasses:
DefaultPseudoState
,ForkPseudoState
,HistoryPseudoState
,JoinPseudoState
Base implementation of a
PseudoState
.-
Constructor Summary
ConstructorDescriptionInstantiates a new abstract 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.protected void
notifyContext
(PseudoStateContext<S, E> context) Notify allPseudoStateListener
s of a new context.void
setPseudoStateListeners
(List<PseudoStateListener<S, E>> listeners) Registers a newPseudoStateListener
s.
-
Constructor Details
-
AbstractPseudoState
Instantiates a new abstract pseudo state.- Parameters:
kind
- the kind
-
-
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
-
notifyContext
Notify allPseudoStateListener
s of a new context.- Parameters:
context
- the new context
-