Package net.i2p.i2ptunnel.irc
Class EventReceiver
java.lang.Object
net.i2p.i2ptunnel.irc.EventReceiver
- All Implemented Interfaces:
EventDispatcher
- Direct Known Subclasses:
DCCClientManager
An implementation of the EventDispatcher interface for
receiving events via in-line notifyEvent() only.
Does not support chaining to additional dispatchers.
Does not support waitEventValue().
Does not support ignoring.
- Since:
- 0.8.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAttach an EventDispatcher object to the events dispatching chain.voidDetach the specified EventDispatcher object from the events dispatching chain.Get an object to be used to deliver events (usuallythis, but YMMV).Retrieve the names of all the events that have been receivedgetEventValue(String name) Retrieve the value currently associated with the specified event valuevoidIgnore further event notificationsabstract voidnotifyEvent(String eventName, Object args) Deliver an eventvoidAlmost like the method above :-)waitEventValue(String name) Wait until the given event has received a value
-
Constructor Details
-
EventReceiver
public EventReceiver()
-
-
Method Details
-
getEventDispatcher
Description copied from interface:EventDispatcherGet an object to be used to deliver events (usuallythis, but YMMV).- Specified by:
getEventDispatcherin interfaceEventDispatcher
-
attachEventDispatcher
Description copied from interface:EventDispatcherAttach an EventDispatcher object to the events dispatching chain. Note that notification is not bidirectional (i.e. events notified toevwon't reach the object calling this method). Good luck, and beware of notification loops! :-)- Specified by:
attachEventDispatcherin interfaceEventDispatcher- Parameters:
ev- Event object to be attached- Throws:
UnsupportedOperationException- always
-
detachEventDispatcher
Description copied from interface:EventDispatcherDetach the specified EventDispatcher object from the events dispatching chain.- Specified by:
detachEventDispatcherin interfaceEventDispatcher- Parameters:
ev- Event object to be detached- Throws:
UnsupportedOperationException- always
-
notifyEvent
Description copied from interface:EventDispatcherDeliver an event- Specified by:
notifyEventin interfaceEventDispatcher- Parameters:
eventName- name of the eventargs- data being stored for that event
-
getEventValue
Description copied from interface:EventDispatcherRetrieve the value currently associated with the specified event value- Specified by:
getEventValuein interfaceEventDispatcher- Parameters:
name- name of the event to query for- Returns:
- value (or null if none are available)
- Throws:
UnsupportedOperationException- always
-
getEvents
Description copied from interface:EventDispatcherRetrieve the names of all the events that have been received- Specified by:
getEventsin interfaceEventDispatcher- Returns:
- A set of event names
- Throws:
UnsupportedOperationException- always
-
ignoreEvents
public void ignoreEvents()Description copied from interface:EventDispatcherIgnore further event notifications- Specified by:
ignoreEventsin interfaceEventDispatcher- Throws:
UnsupportedOperationException- always
-
unIgnoreEvents
public void unIgnoreEvents()Description copied from interface:EventDispatcherAlmost like the method above :-)- Specified by:
unIgnoreEventsin interfaceEventDispatcher
-
waitEventValue
Description copied from interface:EventDispatcherWait until the given event has received a value- Specified by:
waitEventValuein interfaceEventDispatcher- Parameters:
name- name of the event to wait for- Returns:
- value specified for that event
- Throws:
UnsupportedOperationException- always
-