Class OnStateChangedEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.statemachine.event.StateMachineEvent
org.springframework.statemachine.event.OnStateChangedEvent
All Implemented Interfaces:
Serializable

public class OnStateChangedEvent extends StateMachineEvent
Generic event representing that state has been changed.
See Also:
  • Constructor Details

    • OnStateChangedEvent

      public OnStateChangedEvent(Object source, State<?,?> sourceState, State<?,?> targetState)
      Instantiates a new on state changed event.
      Parameters:
      source - the component that published the event (never null)
      sourceState - the source state
      targetState - the target state
  • Method Details

    • getSourceState

      public State<?,?> getSourceState()
      Gets the source state for this event.
      Returns:
      the source state
    • getTargetState

      public State<?,?> getTargetState()
      Gets the target state for this event.
      Returns:
      the target state
    • toString

      public String toString()
      Overrides:
      toString in class StateMachineEvent