Interface StateConfigurer<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Superinterfaces:
AnnotationConfigurerBuilder<StateMachineStateConfigurer<S,E>>
All Known Implementing Classes:
DefaultStateConfigurer

public interface StateConfigurer<S,E> extends AnnotationConfigurerBuilder<StateMachineStateConfigurer<S,E>>
Base StateConfigurer interface for configuring States.
Author:
Janne Valkealahti
  • Method Details

    • initial

      StateConfigurer<S,E> initial(S initial)
      Specify a initial state S.
      Parameters:
      initial - the initial state
      Returns:
      configurer for chaining
    • initial

      StateConfigurer<S,E> initial(S initial, Action<S,E> action)
      Specify a initial state S with an Action to be executed with it. Action can be i.e. used to init extended variables.
      Parameters:
      initial - the initial state
      action - the action
      Returns:
      configurer for chaining
    • parent

      StateConfigurer<S,E> parent(S state)
      Specify a states configured by this configurer instance to be substates of state S.
      Parameters:
      state - the parent state
      Returns:
      configurer for chaining
    • region

      StateConfigurer<S,E> region(String id)
      Specify a region for these states configured by this configurer instance.
      Parameters:
      id - the region id
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state)
      Specify a state S.
      Parameters:
      state - the state
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state, StateMachine<S,E> stateMachine)
      Specify a state S and its relation with a given machine as substate machine.
      Parameters:
      state - the state
      stateMachine - the submachine
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state, StateMachineFactory<S,E> stateMachineFactory)
      Specify a state S and its relation with a given machine as substate machine factory.
      Parameters:
      state - the state
      stateMachineFactory - the submachine factory
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state, Collection<? extends Action<S,E>> stateActions)
      Specify a state S with state Actions.
      Parameters:
      state - the state
      stateActions - the state actions
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state, Action<S,E> stateAction)
      Specify a state S with state Action.
      Parameters:
      state - the state
      stateAction - the state action
      Returns:
      configurer for chaining
    • stateDo

      StateConfigurer<S,E> stateDo(S state, Action<S,E> action)
      Specify a state S with state behaviour Action. Currently synonym for state(Object, Action).
      Parameters:
      state - the state
      action - the state action
      Returns:
      configurer for chaining
      See Also:
    • stateDo

      StateConfigurer<S,E> stateDo(S state, Action<S,E> action, Action<S,E> error)
      Specify a state S with state behaviour Action and error Action callback.
      Parameters:
      state - the state
      action - the state action
      error - action that will be called if any unexpected exception is thrown by the action.
      Returns:
      configurer for chaining
    • stateDoFunction

      StateConfigurer<S,E> stateDoFunction(S state, Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>> action)
      Specify a state S with state behaviour Function.
      Parameters:
      state - the state
      action - the state action
      Returns:
      configurer for chaining
    • stateEntryFunction

      StateConfigurer<S,E> stateEntryFunction(S state, Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>> action)
      Specify a state S with state entry Function.
      Parameters:
      state - the state
      action - the state action
      Returns:
      configurer for chaining
    • stateExitFunction

      StateConfigurer<S,E> stateExitFunction(S state, Function<StateContext<S,E>,reactor.core.publisher.Mono<Void>> action)
      Specify a state S with state exit Function.
      Parameters:
      state - the state
      action - the state action
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state, Collection<? extends Action<S,E>> entryActions, Collection<? extends Action<S,E>> exitActions)
      Specify a state S with entry and exit Actions.
      Parameters:
      state - the state
      entryActions - the state entry actions
      exitActions - the state exit actions
      Returns:
      configurer for chaining
    • state

      StateConfigurer<S,E> state(S state, Action<S,E> entryAction, Action<S,E> exitAction)
      Specify a state S with entry and exit Action.
      Parameters:
      state - the state
      entryAction - the state entry action
      exitAction - the state exit action
      Returns:
      configurer for chaining
    • stateEntry

      StateConfigurer<S,E> stateEntry(S state, Action<S,E> action)
      Specify a state S with state entry Action. Currently synonym for state(Object, Action, Action) with no exit action.
      Parameters:
      state - the state
      action - the state entry action
      Returns:
      configurer for chaining
      See Also:
    • stateEntry

      StateConfigurer<S,E> stateEntry(S state, Action<S,E> action, Action<S,E> error)
      Specify a state S with state entry Action and error Action callback. Currently synonym for state(Object, Action, Action) with no exit action.
      Parameters:
      state - the state
      action - the state entry action
      error - action that will be called if any unexpected exception is thrown by the action.
      Returns:
      configurer for chaining
      See Also:
    • stateExit

      StateConfigurer<S,E> stateExit(S state, Action<S,E> action)
      Specify a state S with state exit Action. Currently synonym for state(Object, Action, Action) with no entry action.
      Parameters:
      state - the state
      action - the state exit action
      Returns:
      configurer for chaining
      See Also:
    • stateExit

      StateConfigurer<S,E> stateExit(S state, Action<S,E> action, Action<S,E> error)
      Specify a state S with state exit Action and error Action callback. Currently synonym for state(Object, Action, Action) with no entry action.
      Parameters:
      state - the state
      action - the state entry action
      error - action that will be called if any unexpected exception is thrown by the action.
      Returns:
      configurer for chaining
      See Also:
    • state

      StateConfigurer<S,E> state(S state, E... deferred)
      Specify a state S with a deferred events E.
      Parameters:
      state - the state
      deferred - the deferred events
      Returns:
      configurer for chaining
    • states

      StateConfigurer<S,E> states(Set<S> states)
      Specify a states S.
      Parameters:
      states - the states
      Returns:
      configurer for chaining
    • end

      StateConfigurer<S,E> end(S end)
      Specify a state S to be end state. This method can be called for each state to be marked as end state.
      Parameters:
      end - the end state
      Returns:
      configurer for chaining
    • choice

      StateConfigurer<S,E> choice(S choice)
      Specify a state S to be choice pseudo state.
      Parameters:
      choice - the choice pseudo state
      Returns:
      configurer for chaining
    • junction

      StateConfigurer<S,E> junction(S junction)
      Specify a state S to be junction pseudo state.
      Parameters:
      junction - the junction pseudo state
      Returns:
      configurer for chaining
    • fork

      StateConfigurer<S,E> fork(S fork)
      Specify a state S to be fork pseudo state.
      Parameters:
      fork - the fork pseudo state
      Returns:
      configurer for chaining
    • join

      StateConfigurer<S,E> join(S join)
      Specify a state S to be join pseudo state.
      Parameters:
      join - the join pseudo state
      Returns:
      configurer for chaining
    • history

      StateConfigurer<S,E> history(S history, StateConfigurer.History type)
      Specify a state S to be history pseudo state.
      Parameters:
      history - the history pseudo state
      type - the history pseudo state type
      Returns:
      configurer for chaining
    • entry

      StateConfigurer<S,E> entry(S entry)
      Specify a state S to be entrypoint pseudo state.
      Parameters:
      entry - the entrypoint pseudo state
      Returns:
      configurer for chaining
    • exit

      StateConfigurer<S,E> exit(S exit)
      Specify a state S to be exitpoint pseudo state.
      Parameters:
      exit - the exitpoint pseudo state
      Returns:
      configurer for chaining