|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.GenericEventMulticaster
public final class GenericEventMulticaster
A generic event multicaster class. The client owns an object of this class,
and calls the fireEvent(java.util.EventObject, freemarker.template.ListenerAdapter) method to fire events.
| Constructor Summary | |
|---|---|
GenericEventMulticaster()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addEventListener(java.util.EventListener listener)
Adds an event listener. |
void |
fireEvent(java.util.EventObject event,
ListenerAdapter adapter)
Fires an event to all the listeners of this multicaster, using a ListenerAdapter. |
java.util.EventListener[] |
getEventListeners()
Gets all the registered event listeners. |
boolean |
isEmpty()
To shortcut event firing: if there's nothing listening, don't bother creating an EventObject. |
void |
removeEventListener(java.util.EventListener listener)
Removes an event listener that was previously added. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GenericEventMulticaster()
| Method Detail |
|---|
public void addEventListener(java.util.EventListener listener)
listener - the event listener to be registeredpublic void removeEventListener(java.util.EventListener listener)
listener - the event listener to be unregisteredpublic java.util.EventListener[] getEventListeners()
public boolean isEmpty()
EventObject.
true if there are no registered listeners, otherwise
false
public void fireEvent(java.util.EventObject event,
ListenerAdapter adapter)
ListenerAdapter. If any listener throws an exception, we
immediately abort sending the event to any other listeners.
event - the event to be sent to each of the listenersadapter - adapts the event listeners to this multicasterListenerAdapterpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||