|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.osgi.framework.eventmgr.EventListeners
public class EventListeners
This class manages a list of listeners. Listeners may be added or removed as necessary.
Constructor Summary | |
---|---|
EventListeners()
Creates a listener list with an initial capacity of 10. |
|
EventListeners(int capacity)
Creates a listener list with the given initial capacity. |
Method Summary | |
---|---|
void |
addListener(java.lang.Object listener,
java.lang.Object listenerObject)
Add a listener to the list. |
void |
removeAllListeners()
Remove all listeners from the list. |
void |
removeListener(java.lang.Object listener)
Remove a listener from the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventListeners()
public EventListeners(int capacity)
capacity
- The number of listeners which this list can initially
accept without growing its internal representation; must be at
least 1
java.lang.IllegalArgumentException
- If capacity is less than 1.Method Detail |
---|
public void addListener(java.lang.Object listener, java.lang.Object listenerObject)
listener
- This is the listener object to be added to the list.listenerObject
- This is an optional listener-specific object.
This object will be passed to the EventDispatcher along with the listener
when the listener is to be called. This may be null
java.lang.IllegalArgumentException
- If listener is null.public void removeListener(java.lang.Object listener)
listener
- This is the listener object to be removed from the list.
java.lang.IllegalArgumentException
- If listener is null.public void removeAllListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |