Class EnumState<S extends Enum<S>,E extends Enum<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

public class EnumState<S extends Enum<S>,E extends Enum<E>> extends ObjectState<S,E>
A State implementation where state and event is enum based.
Author:
Janne Valkealahti
  • Constructor Details

    • EnumState

      public EnumState(S id)
      Instantiates a new enum state.
      Parameters:
      id - the id
    • EnumState

      public EnumState(S id, PseudoState<S,E> pseudoState)
      Instantiates a new enum state.
      Parameters:
      id - the id
      pseudoState - the pseudo state
    • EnumState

      public EnumState(S id, Collection<E> deferred)
      Instantiates a new enum state.
      Parameters:
      id - the id
      deferred - the deferred
    • EnumState

      public EnumState(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 enum state.
      Parameters:
      id - the id
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
    • EnumState

      public EnumState(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 enum state.
      Parameters:
      id - the id
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      pseudoState - the pseudo state
    • EnumState

      public EnumState(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 enum state.
      Parameters:
      id - the id
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      pseudoState - the pseudo state
      regions - the regions
    • EnumState

      public EnumState(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 enum state.
      Parameters:
      id - the id
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      pseudoState - the pseudo state
      submachine - the submachine