NextApp Echo3
v3.0.b4

nextapp.echo.app.event
Class EventListenerList

java.lang.Object
  extended by nextapp.echo.app.event.EventListenerList
All Implemented Interfaces:
java.io.Serializable

public class EventListenerList
extends java.lang.Object
implements java.io.Serializable

A generic storage facility for listeners.

See Also:
Serialized Form

Constructor Summary
EventListenerList()
          Creates a new listener list.
 
Method Summary
 void addListener(java.lang.Class listenerClass, java.util.EventListener l)
          Adds a listener of the given class to the list.
 int getListenerCount(java.lang.Class listenerClass)
          Returns the number of listeners present of the given class.
 java.util.EventListener[] getListeners(java.lang.Class listenerClass)
          Returns an array of listeners of the given class.
 void removeListener(java.lang.Class listenerClass, java.util.EventListener l)
          Removes a listener of the given class from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventListenerList

public EventListenerList()
Creates a new listener list.

Method Detail

addListener

public void addListener(java.lang.Class listenerClass,
                        java.util.EventListener l)
Adds a listener of the given class to the list.

Parameters:
listenerClass - the Class of the listener being added
l - the listener to add

getListenerCount

public int getListenerCount(java.lang.Class listenerClass)
Returns the number of listeners present of the given class.

Parameters:
listenerClass - the Class of the listener for which the listener count is desired
Returns:
the number of listeners present for the specified listener Class

getListeners

public java.util.EventListener[] getListeners(java.lang.Class listenerClass)
Returns an array of listeners of the given class.

Parameters:
listenerClass - the desired Class of listener
Returns:
an array of listeners of the given Class (if no listeners of the specified class exist, an empty array is returned)

removeListener

public void removeListener(java.lang.Class listenerClass,
                           java.util.EventListener l)
Removes a listener of the given class from the list.

Parameters:
listenerClass - the Class of the listener being removed
l - the listener to remove

NextApp Echo3
v3.0.b4