|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.limewire.listener.AsynchronousMulticaster<E>
public class AsynchronousMulticaster<E>
An EventMulticaster that broadcasts all its events within an executor. This is useful if you want to asynchronously notify listeners about events (especially handy if the events are generated while holding a lock). If the executor is single-threaded, this can guarantee that all events are dispatched in the same order they were broadcast.
| Constructor Summary | |
|---|---|
AsynchronousMulticaster(Executor executor)
|
|
AsynchronousMulticaster(Executor executor,
Class loggerKey)
|
|
AsynchronousMulticaster(Executor executor,
Log log)
|
|
| Method Summary | |
|---|---|
void |
addListener(EventListener<E> listener)
Adds the listener. |
void |
broadcast(E event)
Broadcasts this event to anyone listening. |
void |
handleEvent(E event)
Notification that an event has occurred and should be handled. |
boolean |
removeListener(EventListener<E> listener)
Returns true if the listener was removed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsynchronousMulticaster(Executor executor)
public AsynchronousMulticaster(Executor executor,
Class loggerKey)
public AsynchronousMulticaster(Executor executor,
Log log)
| Method Detail |
|---|
public void addListener(EventListener<E> listener)
ListenerSupport
addListener in interface ListenerSupport<E>public boolean removeListener(EventListener<E> listener)
ListenerSupport
removeListener in interface ListenerSupport<E>public void handleEvent(E event)
EventListener
handleEvent in interface EventListener<E>public void broadcast(E event)
EventBroadcaster
broadcast in interface EventBroadcaster<E>
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||