Class EventListeners<K,V>
java.lang.Object
org.eclipse.osgi.framework.eventmgr.EventListeners<K,V>
Deprecated.
As of 3.5. Replaced by CopyOnWriteIdentityMap.
This class manages a list of listeners.
Listeners may be added or removed as necessary.
This class uses identity for comparison, not equals.
- Since:
- 3.1
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionDeprecated.Creates an empty listener list.EventListeners
(int capacity) Deprecated.Creates an empty listener list. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(K listener, V listenerObject) Deprecated.Add a listener to the list.void
Deprecated.Remove all listeners from the list.void
removeListener
(K listener) Deprecated.Remove a listener from the list.
-
Constructor Details
-
EventListeners
public EventListeners()Deprecated.Creates an empty listener list. -
EventListeners
public EventListeners(int capacity) Deprecated.Creates an empty listener list.- Parameters:
capacity
- This argument is ignored.
-
-
Method Details
-
addListener
Deprecated.Add a listener to the list. If a listener object is already in the list, then it is replaced. This method calls the put method.- Parameters:
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- Throws:
NullPointerException
- If listener is null.
-
removeListener
Deprecated.Remove a listener from the list. This method calls the remove method.- Parameters:
listener
- This is the listener object to be removed from the list.- Throws:
NullPointerException
- If listener is null.
-
removeAllListeners
public void removeAllListeners()Deprecated.Remove all listeners from the list. This method calls the clear method.
-