Class BaseStateChanger<S extends State>

java.lang.Object
org.oddjob.state.BaseStateChanger<S>
Type Parameters:
S - The type of State.
All Implemented Interfaces:
StateChanger<S>
Direct Known Subclasses:
EventStateChanger, JobStateChanger, ParentStateChanger, ServiceStateChanger, TimerStateChanger

public class BaseStateChanger<S extends State> extends Object implements StateChanger<S>
Base functionality for changing State. This utility class is responsible for notifying the change with the StateHandler, changing the icon, and persisting the job if necessary.
Author:
rob
  • Constructor Details

  • Method Details

    • setState

      public void setState(S state)
      Description copied from interface: StateChanger
      Set the state to given state.
      Specified by:
      setState in interface StateChanger<S extends State>
      Parameters:
      state - The state.
    • setState

      public void setState(S state, StateInstant stateInstant)
      Description copied from interface: StateChanger
      Set the state to the given state with the given event time.
      Specified by:
      setState in interface StateChanger<S extends State>
      Parameters:
      state - The state.
      stateInstant - The unique event time.
    • setStateException

      public void setStateException(Throwable t)
      Description copied from interface: StateChanger
      Set the state to an EXCEPTION state.
      Specified by:
      setStateException in interface StateChanger<S extends State>
      Parameters:
      t - The Exception.
    • setStateException

      public void setStateException(Throwable t, StateInstant instant)
      Description copied from interface: StateChanger
      Set the state to an EXCEPTION state with the given event time.
      Specified by:
      setStateException in interface StateChanger<S extends State>
      Parameters:
      t - The Exception.
      instant - The unique event time.