Interface PseudoState<S,E>

Type Parameters:
S - the type of state
E - 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 Details

    • getKind

      PseudoStateKind getKind()
      Gets the pseudostate kind.
      Returns:
      the pseudostate kind
    • entry

      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.
      Parameters:
      context - the context
      Returns:
      the next state or null
    • exit

      reactor.core.publisher.Mono<Void> exit(StateContext<S,E> context)
      Initiate an exit sequence for the state.
      Parameters:
      context - the context
      Returns:
      mono of completion
    • addPseudoStateListener

      void addPseudoStateListener(PseudoStateListener<S,E> listener)
      Registers a new PseudoStateListener.
      Parameters:
      listener - the listener
    • setPseudoStateListeners

      void setPseudoStateListeners(List<PseudoStateListener<S,E>> listeners)
      Registers a new PseudoStateListeners. Clears all existing listeners.
      Parameters:
      listeners - the listeners