Class ProjogListeners

java.lang.Object
org.projog.core.event.ProjogListeners

public class ProjogListeners extends Object
Controls the registering and notification of listeners of a KnowledgeBase.

Each KnowledgeBase has a single unique ProjogListeners instance.

See Also:
  • Constructor Details

    • ProjogListeners

      public ProjogListeners()
  • Method Details

    • addListener

      public boolean addListener(ProjogListener listener)
      Adds a listener to the set of listeners.
      Parameters:
      listener - a listener to be added
      Returns:
      true if this instance did not already reference the specified listener
    • deleteListener

      public boolean deleteListener(ProjogListener listener)
      Deletes an observer from the set of observers of this objects internal Observable.
      Parameters:
      listener - a listener to be deleted
      Returns:
      true if this instance did reference the specified listener
    • notifyCall

      public void notifyCall(SpyPoints.SpyPointEvent event)
      Notify all listeners of a first attempt to evaluate a goal.
    • notifyRedo

      public void notifyRedo(SpyPoints.SpyPointEvent event)
      Notify all listeners of an attempt to re-evaluate a goal.
    • notifyExit

      public void notifyExit(SpyPoints.SpyPointExitEvent event)
      Notify all listeners when an attempt to evaluate a goal succeeds.
    • notifyFail

      public void notifyFail(SpyPoints.SpyPointEvent event)
      Notify all listeners when an attempt to evaluate a goal fails.
    • notifyWarn

      public void notifyWarn(String message)
      Notify all listeners of a warning.
    • notifyInfo

      public void notifyInfo(String message)
      Notify all listeners of a general information event.