| 
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ireasoning.protocol.ListenerManager
This class provides functionalities to manage Listener pool, including methods such as add/remove/notify listeners.
| Field Summary | |
protected  Listener[] | 
_listeners
Array of registered Listener objects.  | 
| Constructor Summary | |
ListenerManager()
 | 
|
| Method Summary | |
 void | 
addListener(Listener listener)
This method allows the registration of event listeners.  | 
protected  boolean | 
listenerExists()
Checks if there's any listener registered  | 
 void | 
notifyListeners(Msg msg)
Notifys all listeners on just recieved message  | 
 void | 
notifyListeners(Msg[] msg)
Notifys all listeners on just recieved message  | 
 void | 
removeListener(Listener listener)
This method allows the removal of event listeners from the event target.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected Listener[] _listeners
| Constructor Detail | 
public ListenerManager()
| Method Detail | 
public void addListener(Listener listener)
listener - an object which implements Listener interface. If passed listener already exists, it will not be added.Listener.handleMsg(java.lang.Object, com.ireasoning.protocol.Msg)public void removeListener(Listener listener)
listener - an object which implements Listener interfaceprotected boolean listenerExists()
public void notifyListeners(Msg msg)
msg - the message object to notifypublic void notifyListeners(Msg[] msg)
msg - the message object to notify
  | 
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||