Class StateMachineInterceptorList<S,E>

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

public class StateMachineInterceptorList<S,E> extends Object
Support class working with a StateMachineInterceptors.
Author:
Janne Valkealahti
  • Constructor Details

    • StateMachineInterceptorList

      public StateMachineInterceptorList()
  • Method Details

    • set

      public boolean set(List<StateMachineInterceptor<S,E>> interceptors)
      Sets the interceptors, clears any existing interceptors.
      Parameters:
      interceptors - the list of interceptors
      Returns:
      true if interceptor list changed as a result of the call
    • add

      public boolean add(StateMachineInterceptor<S,E> interceptor)
      Adds interceptor to the list.
      Parameters:
      interceptor - the interceptor
      Returns:
      true (as specified by Collection.add(E))
    • remove

      public boolean remove(StateMachineInterceptor<S,E> interceptor)
      Removes interceptor from the list.
      Parameters:
      interceptor - the interceptor
      Returns:
      true (as specified by Collection.remove(java.lang.Object))
    • preEvent

      public org.springframework.messaging.Message<E> preEvent(org.springframework.messaging.Message<E> message, StateMachine<S,E> stateMachine)
      Pre event.
      Parameters:
      message - the message
      stateMachine - the state machine
      Returns:
      the message
    • preStateChange

      public void preStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine, StateMachine<S,E> rootStateMachine)
      Pre state change.
      Parameters:
      state - the state
      message - the message
      transition - the transition
      stateMachine - the state machine
      rootStateMachine - the root state machine
    • postStateChange

      public void postStateChange(State<S,E> state, org.springframework.messaging.Message<E> message, Transition<S,E> transition, StateMachine<S,E> stateMachine, StateMachine<S,E> rootStateMachine)
      Post state change.
      Parameters:
      state - the state
      message - the message
      transition - the transition
      stateMachine - the state machine
      rootStateMachine - the root state machine
    • preTransition

      public StateContext<S,E> preTransition(StateContext<S,E> stateContext)
      Pre transition.
      Parameters:
      stateContext - the state context
      Returns:
      the state context
    • postTransition

      public StateContext<S,E> postTransition(StateContext<S,E> stateContext)
      Post transition.
      Parameters:
      stateContext - the state context
      Returns:
      the state context
    • stateMachineError

      public Exception stateMachineError(StateMachine<S,E> stateMachine, Exception exception)
      State machine error.
      Parameters:
      stateMachine - the state machine
      exception - the exception
      Returns:
      the exception
    • toString

      public String toString()
      Overrides:
      toString in class Object