Class StateData<S,E>

java.lang.Object
org.springframework.statemachine.config.model.StateData<S,E>
Type Parameters:
S - the type of state
E - the type of event

public class StateData<S,E> extends Object
StateData is a data representation of a State used as an abstraction between a StateMachineFactory and a state machine configuration.
  • Constructor Details

    • StateData

      public StateData(S state)
      Instantiates a new state data.
      Parameters:
      state - the state
    • StateData

      public StateData(S state, boolean initial)
      Instantiates a new state data.
      Parameters:
      state - the state
      initial - the initial
    • StateData

      public StateData(Object parent, Object region, S state, boolean initial)
      Instantiates a new state data.
      Parameters:
      parent - the parent
      region - the region
      state - the state
      initial - the initial
    • StateData

      public StateData(Object parent, Object region, S state, 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 state data.
      Parameters:
      parent - the parent
      region - the region
      state - the state
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
    • StateData

      public StateData(Object parent, Object region, S state, 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, boolean initial)
      Instantiates a new state data.
      Parameters:
      parent - the parent
      region - the region
      state - the state
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      initial - the initial
    • StateData

      public StateData(Object parent, Object region, S state, 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, boolean initial, Action<S,E> initialAction)
      Instantiates a new state data.
      Parameters:
      parent - the parent
      region - the region
      state - the state
      deferred - the deferred
      entryActions - the entry actions
      exitActions - the exit actions
      initial - the initial
      initialAction - the initial action
  • Method Details

    • getState

      public S getState()
      Gets the state.
      Returns:
      the state
    • getSubmachineStateData

      public Collection<StateData<S,E>> getSubmachineStateData()
      Gets the submachine state data.
      Returns:
      the submachine state data
    • setSubmachineStateData

      public void setSubmachineStateData(Collection<StateData<S,E>> submachineStateData)
      Sets the submachine state data.
      Parameters:
      submachineStateData - the submachine state data
    • getSubmachine

      public StateMachine<S,E> getSubmachine()
      Gets the submachine.
      Returns:
      the submachine
    • setSubmachine

      public void setSubmachine(StateMachine<S,E> submachine)
      Sets the submachine.
      Parameters:
      submachine - the submachine
    • getSubmachineFactory

      public StateMachineFactory<S,E> getSubmachineFactory()
      Gets the submachine factory.
      Returns:
      the submachine factory
    • setSubmachineFactory

      public void setSubmachineFactory(StateMachineFactory<S,E> submachineFactory)
      Sets the submachine factory.
      Parameters:
      submachineFactory - the submachine factory
    • setSubmachine

      public void setSubmachine(StateMachineFactory<S,E> submachineFactory)
      Sets the submachine factory.
      Parameters:
      submachineFactory - the submachine factory
    • getDeferred

      public Collection<E> getDeferred()
      Gets the deferred.
      Returns:
      the deferred
    • setDeferred

      public void setDeferred(Collection<E> deferred)
      Sets the deferred.
      Parameters:
      deferred - the new deferred
    • getEntryActions

      public Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> getEntryActions()
      Gets the entry actions.
      Returns:
      the entry actions
    • setEntryActions

      public void setEntryActions(Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> entryActions)
      Sets the entry actions.
      Parameters:
      entryActions - the entry actions
    • getExitActions

      public Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> getExitActions()
      Gets the exit actions.
      Returns:
      the exit actions
    • setExitActions

      public void setExitActions(Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> exitActions)
      Sets the exit actions.
      Parameters:
      exitActions - the exit actions
    • getStateActions

      public Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> getStateActions()
      Gets the state actions.
      Returns:
      the state actions
    • setStateActions

      public void setStateActions(Collection<Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>>> stateActions)
      Sets the state actions.
      Parameters:
      stateActions - the state actions
    • getParent

      public Object getParent()
      Gets the parent.
      Returns:
      the parent
    • setParent

      public void setParent(Object parent)
      Sets the parent.
      Parameters:
      parent - the new parent
    • getRegion

      public Object getRegion()
      Gets the region.
      Returns:
      the region
    • setRegion

      public void setRegion(Object region)
      Sets the region.
      Parameters:
      region - the new region
    • isInitial

      public boolean isInitial()
      Checks if is initial.
      Returns:
      true, if is initial
    • setInitial

      public void setInitial(boolean initial)
      Sets the initial.
      Parameters:
      initial - the new initial
    • setInitialAction

      public void setInitialAction(Action<S,E> action)
      Sets the initial action.
      Parameters:
      action - the action
    • getInitialAction

      public Action<S,E> getInitialAction()
    • isEnd

      public boolean isEnd()
      Checks if is end.
      Returns:
      true, if is end
    • setEnd

      public void setEnd(boolean end)
      Sets the end.
      Parameters:
      end - the new end
    • getPseudoStateKind

      public PseudoStateKind getPseudoStateKind()
      Gets the pseudo state kind.
      Returns:
      the pseudo state kind
    • setPseudoStateKind

      public void setPseudoStateKind(PseudoStateKind pseudoStateKind)
      Sets the pseudo state kind.
      Parameters:
      pseudoStateKind - the new pseudo state kind
    • toString

      public String toString()
      Overrides:
      toString in class Object