Interface StateMachine<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Superinterfaces:
Region<S,E>, StateMachineReactiveLifecycle
All Known Implementing Classes:
AbstractStateMachine, DistributedStateMachine, ObjectStateMachine

public interface StateMachine<S,E> extends Region<S,E>
StateMachine provides an APIs for generic finite state machine needed for basic operations like working with states, events and a lifecycle.
  • Method Details

    • getInitialState

      State<S,E> getInitialState()
      Gets the initial state S.
      Returns:
      initial state
    • getExtendedState

      ExtendedState getExtendedState()
      Gets the state machine extended state.
      Returns:
      extended state
    • getStateMachineAccessor

      StateMachineAccessor<S,E> getStateMachineAccessor()
      Gets the state machine accessor.
      Returns:
      the state machine accessor
    • setStateMachineError

      void setStateMachineError(Exception exception)
      Sets the state machine error.
      Parameters:
      exception - the new state machine error
    • hasStateMachineError

      boolean hasStateMachineError()
      Checks for state machine error.
      Returns:
      true, if error has been set