Class AbstractSimpleState<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, State<S,E>, StateMachineReactiveLifecycle
Direct Known Subclasses:
ObjectState

public abstract class AbstractSimpleState<S,E> extends AbstractState<S,E>
Base implementation of a State having a single state identifier.
  • Constructor Details

    • AbstractSimpleState

      public AbstractSimpleState(S id)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
    • AbstractSimpleState

      public AbstractSimpleState(S id, Collection<E> deferred, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> exitActions)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
    • AbstractSimpleState

      public AbstractSimpleState(S id, Collection<E> deferred)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
      deferred - the deferred
    • AbstractSimpleState

      public AbstractSimpleState(S id, PseudoState<S,E> pseudoState)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
      pseudoState - the pseudo state
    • AbstractSimpleState

      public AbstractSimpleState(S id, Collection<E> deferred, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S,E> pseudoState, Collection<Region<S,E>> regions)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      pseudoState - the pseudo state
      regions - the regions
    • AbstractSimpleState

      public AbstractSimpleState(S id, Collection<E> deferred, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S,E> pseudoState, StateMachine<S,E> submachine)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      pseudoState - the pseudo state
      submachine - the submachine
    • AbstractSimpleState

      public AbstractSimpleState(S id, Collection<E> deferred, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> exitActions, PseudoState<S,E> pseudoState)
      Instantiates a new abstract simple state.
      Parameters:
      id - the state identifier
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      pseudoState - the pseudo state
    • AbstractSimpleState

      public AbstractSimpleState(S id, Collection<E> deferred, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> entryActions, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> exitActions, Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> stateActions, PseudoState<S,E> pseudoState, Collection<Region<S,E>> regions, StateMachine<S,E> submachine)
      Instantiates a new abstract simple state.
      Parameters:
      id - the id
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      stateActions - the state actions
      pseudoState - the pseudo state
      regions - the regions
      submachine - the submachine
  • Method Details

    • getIds

      public Collection<S> getIds()
      Description copied from interface: State
      Gets the state identifiers. Usually returned collection contains only one identifier except in a case where state is an orthogonal.
      Specified by:
      getIds in interface State<S,E>
      Specified by:
      getIds in class AbstractState<S,E>
      Returns:
      the state identifiers
    • getStates

      public Collection<State<S,E>> getStates()
      Description copied from interface: State
      Gets all possible states this state knows about including itself and substates.
      Specified by:
      getStates in interface State<S,E>
      Specified by:
      getStates in class AbstractState<S,E>
      Returns:
      all state including itself and nested states