Interface StateMachineListener<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Known Implementing Classes:
CompositeStateMachineListener, LatchStateMachineListener, StateMachineListenerAdapter, StateMachineObjectSupport.StateMachineListenerRelay

public interface StateMachineListener<S,E>
StateMachineListener for various state machine events.
Author:
Janne Valkealahti
  • Method Details

    • stateChanged

      void stateChanged(State<S,E> from, State<S,E> to)
      Notified when state is changed.
      Parameters:
      from - the source state
      to - the target state
    • stateEntered

      void stateEntered(State<S,E> state)
      Notified when state is entered.
      Parameters:
      state - the state
    • stateExited

      void stateExited(State<S,E> state)
      Notified when state is exited.
      Parameters:
      state - the state
    • eventNotAccepted

      void eventNotAccepted(org.springframework.messaging.Message<E> event)
      Notified when event was not accepted.
      Parameters:
      event - the event
    • transition

      void transition(Transition<S,E> transition)
      Notified when transition happened.
      Parameters:
      transition - the transition
    • transitionStarted

      void transitionStarted(Transition<S,E> transition)
      Notified when transition started.
      Parameters:
      transition - the transition
    • transitionEnded

      void transitionEnded(Transition<S,E> transition)
      Notified when transition ended.
      Parameters:
      transition - the transition
    • stateMachineStarted

      void stateMachineStarted(StateMachine<S,E> stateMachine)
      Notified when statemachine starts
      Parameters:
      stateMachine - the statemachine
    • stateMachineStopped

      void stateMachineStopped(StateMachine<S,E> stateMachine)
      Notified when statemachine stops
      Parameters:
      stateMachine - the statemachine
    • stateMachineError

      void stateMachineError(StateMachine<S,E> stateMachine, Exception exception)
      Notified when statemachine enters error it can't recover from.
      Parameters:
      stateMachine - the state machine
      exception - the exception
    • extendedStateChanged

      void extendedStateChanged(Object key, Object value)
      Notified when extended state variable is either added, modified or removed.
      Parameters:
      key - the variable key
      value - the variable value
    • stateContext

      void stateContext(StateContext<S,E> stateContext)
      Notified on various StateContext.Stages about a StateContext.
      Parameters:
      stateContext - the state context