Provides methods for maintaining a list of listeners and firing events on that list. This class is thread safe and serializable.
Usage Example:
private EventListenerListHelper fooListeners = new EventListenerListHelper(FooListener.class); public void addFooListener(FooListener listener) { fooListeners.add(listener); } public void removeFooListener(FooListener listener) { fooListeners.remove(listener); } protected void fireFooXXX() { fooListeners.fire("fooXXX", new Event()); } protected void fireFooYYY() { fooListeners.fire("fooYYY"); }@author Oliver Hutchison @author Keith Donald
|
|