public interface EventDispatcher
_event (as suggested in EventDispatcherImpl documentation)
and cut'n'paste the following default implementation:
public EventDispatcher getEventDispatcher() { return _event; }
public void attachEventDispatcher(IEventDispatcher e) { _event.attachEventDispatcher(e.getEventDispatcher()); }
public void detachEventDispatcher(IEventDispatcher e) { _event.detachEventDispatcher(e.getEventDispatcher()); }
public void notifyEvent(String e, Object a) { _event.notifyEvent(e,a); }
public Object getEventValue(String n) { return _event.getEventValue(n); }
public Set getEvents() { return _event.getEvents(); }
public void ignoreEvents() { _event.ignoreEvents(); }
public void unIgnoreEvents() { _event.unIgnoreEvents(); }
public Object waitEventValue(String n) { return _event.waitEventValue(n); }
Deprecated - Used only by I2PTunnel| Modifier and Type | Method and Description |
|---|---|
void |
attachEventDispatcher(EventDispatcher iev)
Attach an EventDispatcher object to the events dispatching chain.
|
void |
detachEventDispatcher(EventDispatcher iev)
Detach the specified EventDispatcher object from the events dispatching chain.
|
EventDispatcher |
getEventDispatcher()
Get an object to be used to deliver events (usually
this, but YMMV). |
Set<String> |
getEvents()
Retrieve the names of all the events that have been received
|
Object |
getEventValue(String name)
Retrieve the value currently associated with the specified
event value
|
void |
ignoreEvents()
Ignore further event notifications
|
void |
notifyEvent(String event,
Object args)
Deliver an event
|
void |
unIgnoreEvents()
Almost like the method above :-)
|
Object |
waitEventValue(String name)
Wait until the given event has received a value
|
void attachEventDispatcher(EventDispatcher iev)
ev won't reach the object calling this method).
Good luck, and beware of notification loops! :-)iev - Event object to be attachedvoid detachEventDispatcher(EventDispatcher iev)
iev - Event object to be detachedEventDispatcher getEventDispatcher()
this, but YMMV).Set<String> getEvents()
Object getEventValue(String name)
name - name of the event to query forvoid ignoreEvents()
void notifyEvent(String event, Object args)
event - name of the eventargs - data being stored for that eventvoid unIgnoreEvents()