public class ListenerList<T>
Provides a list of objects, primarily intended for listeners, and a way to
invoke a method in all the registered listeners, that is fire an event.
Listeners can be added or removed while an event is being fired and the
listener list is being iterated.
Changing the listener list while an event is being fired works such that
all changes are stored in a separate list which is processed after the
event firing completes. This means that all listeners that were in the
listener list at the time event firing started will receive the event even
if they are removed from the listener list. Similarly, new listeners added
during event firing will not receive the event.
Events can be fired by providing the name of the method or a Method object
along with parameters for the method. Alternatively you can extend
this class to have separate fire methods for different events.
This class is thread safe and no outside synchronization is needed.