Class ControllerState

  • All Implemented Interfaces:
    Observer

    public abstract class ControllerState
    extends Object
    implements Observer

    ControllerState is the core base class for the CHEF Tool's state objects.

    State objects are used to store controller state for a tool. Specific state object implement this interface.

    To support creation of controller state objects, make sure to supply a void constructor.

    To support pooling of objects, implement the recycle() method to release any resources and restore the object to initial conditions before reuse.

    • Constructor Detail

      • ControllerState

        public ControllerState()
    • Method Detail

      • init

        protected void init()
        Init to startup values
      • recycle

        public void recycle()
        Release any resources and restore the object to initial conditions to be reused.
      • getId

        public String getId()
      • setId

        public void setId​(String id)
      • getSetId

        public String getSetId()
      • setSetId

        public void setSetId​(String id)
      • getKey

        public String getKey()
        Access a unique key for this state, combining the set id and the state id.
        Returns:
        A unique key for this state, combining the set id and the state id.
      • update

        public void update​(Observable o,
                           Object arg)
        This method is called whenever the observed object is changed. An application calls an Observable object's notifyObservers method to have all the object's observers notified of the change. default implementation is to cause the courier service to deliver to the interface controlled by my controller. Extensions can override.
        Specified by:
        update in interface Observer
        Parameters:
        o - the observable object.
        arg - an argument passed to the notifyObservers method.