|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.logicalcobwebs.proxool.util.AbstractListenerContainer
public abstract class AbstractListenerContainer
Implementation of ListenerContainerIF that uses a reads/write lock to handle concurrency in a safe and
fast way.
The registered listeners are offered to subclasses through the protected getListeners() method. This
method returns a reference to an array containing the registered listeners. A new array holding the listeners
is created everytime a modification on the registration list is required (add/remove listener). Therefore,
subclasses can safely iterate over the received array.
Your code sould look like this:
Object[] listeners = getListeners();
for(int i=0; i
| 构造方法摘要 | |
|---|---|
AbstractListenerContainer()
|
|
| 方法摘要 | |
|---|---|
void |
addListener(Object listener)
Add a listener to this container. |
protected Object[] |
getListeners()
Get a reference to the array of registered listeners. |
boolean |
isEmpty()
Get wether this container is empty or not. |
boolean |
removeListener(Object listener)
Remove a listener from this container. |
static String |
stringToUP(String str)
|
static String |
UPToString(String str)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public AbstractListenerContainer()
| 方法详细信息 |
|---|
public void addListener(Object listener)
ListenerContainerIF 复制的描述
ListenerContainerIF 中的 addListenerlistener - the listener to add.ListenerContainerIF.addListener(Object)public boolean removeListener(Object listener)
ListenerContainerIF 复制的描述
ListenerContainerIF 中的 removeListenerlistener - the listener to be removed.
ListenerContainerIF.removeListener(Object)protected Object[] getListeners()
public boolean isEmpty()
ListenerContainerIF 复制的描述
ListenerContainerIF 中的 isEmptyListenerContainerIF.isEmpty()public static String UPToString(String str)
public static String stringToUP(String str)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||