|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectimx.lib.listener.ListenerBag
public class ListenerBag
ListenerBag is used to implement easily an active object (one that implements the ActiveInterface). It handles the listeners, updates them and offers a lock mechanisme. This ListenerBag does not handle EventTypes.
ListenerInterface,
Serialized Form| Constructor Summary | |
|---|---|
ListenerBag()
|
|
ListenerBag(java.lang.String name)
If you want to set a unique identifier to be used in the logs for this ListenerBag, define it with the parameter name. |
|
| Method Summary | |
|---|---|
void |
addListener(ListenerInterface listener)
|
void |
lock()
Blocks all update calls until unlock() is called. unlock() needs to be called as many times as lock has been called before. |
void |
removeAllListener()
|
void |
removeListener(ListenerInterface listener)
|
void |
unlock()
|
void |
update(java.lang.Object command)
Updates all registered listeners with command, if the ListenerBag has not been locked. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListenerBag(java.lang.String name)
public ListenerBag()
| Method Detail |
|---|
public void addListener(ListenerInterface listener)
public void removeListener(ListenerInterface listener)
public void removeAllListener()
public void update(java.lang.Object command)
public void lock()
public void unlock()
lock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||