Class ProjogListeners
java.lang.Object
org.projog.core.event.ProjogListeners
Controls the registering and notification of listeners of a
KnowledgeBase.
Each KnowledgeBase has a single unique ProjogListeners instance.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddListener(ProjogListener listener) Adds a listener to the set of listeners.booleandeleteListener(ProjogListener listener) Deletes an observer from the set of observers of this objects internalObservable.voidNotify all listeners of a first attempt to evaluate a goal.voidNotify all listeners when an attempt to evaluate a goal succeeds.voidNotify all listeners when an attempt to evaluate a goal fails.voidnotifyInfo(String message) Notify all listeners of a general information event.voidNotify all listeners of an attempt to re-evaluate a goal.voidnotifyWarn(String message) Notify all listeners of a warning.
-
Constructor Details
-
ProjogListeners
public ProjogListeners()
-
-
Method Details
-
addListener
Adds a listener to the set of listeners.- Parameters:
listener- a listener to be added- Returns:
trueif this instance did not already reference the specified listener
-
deleteListener
Deletes an observer from the set of observers of this objects internalObservable.- Parameters:
listener- a listener to be deleted- Returns:
trueif this instance did reference the specified listener
-
notifyCall
Notify all listeners of a first attempt to evaluate a goal. -
notifyRedo
Notify all listeners of an attempt to re-evaluate a goal. -
notifyExit
Notify all listeners when an attempt to evaluate a goal succeeds. -
notifyFail
Notify all listeners when an attempt to evaluate a goal fails. -
notifyWarn
Notify all listeners of a warning. -
notifyInfo
Notify all listeners of a general information event.
-