|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.event.DeferredEventDispatcher
public class DeferredEventDispatcher
Pluggable helper object for management and dispatching of events. This utility is quite handsome when you
Events are forwarded upon "flush" to all listeners in the thread of the caller.
| Constructor Summary | |
|---|---|
DeferredEventDispatcher(EventDispatcher dispatcher)
|
|
DeferredEventDispatcher(Object owner)
|
|
| Method Summary | |
|---|---|
void |
addNotificationListener(EventType type,
INotificationListener listener)
Add listener to the collection of objects to be informed
when the receiver triggers an event of type name. |
void |
flush()
|
void |
handleEvent(Event event)
Called when an event occurs. |
boolean |
hasListener()
|
void |
removeNotificationListener(EventType type,
INotificationListener listener)
Remove listener from the collection of objects to be
informed about events of type name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeferredEventDispatcher(EventDispatcher dispatcher)
public DeferredEventDispatcher(Object owner)
| Method Detail |
|---|
public void addNotificationListener(EventType type,
INotificationListener listener)
INotificationSupportlistener to the collection of objects to be informed
when the receiver triggers an event of type name.
addNotificationListener in interface INotificationSupporttype - The event type we are interested in.listener - The object to be informed about an event occurrencepublic void flush()
public void handleEvent(Event event)
INotificationListener
handleEvent in interface INotificationListenerevent - The event object giving detail information about the context.public boolean hasListener()
public void removeNotificationListener(EventType type,
INotificationListener listener)
INotificationSupportlistener from the collection of objects to be
informed about events of type name.
removeNotificationListener in interface INotificationSupporttype - The event type we are no longer interested in.listener - The object registered for the event till now.
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||