@ThreadSafe public static class CastEvent.ThreadedCastEventListenerList extends CastEvent.AbstractCastEventListenerList
CastEvent.CastEventListenerList implementation that invokes
CastEvent.CastEventListeners using the specified Executor when
fire(CastEvent) is called.| Modifier and Type | Class and Description |
|---|---|
protected static class |
CastEvent.ThreadedCastEventListenerList.Invoker
A
Runnable implementation that simply invokes a listener. |
| Modifier and Type | Field and Description |
|---|---|
protected Executor |
notifier
The
Executor that is used to invoke listeners |
filters, filtersLock, listeners, remoteName| Constructor and Description |
|---|
ThreadedCastEventListenerList(Executor notifier,
String remoteName)
Creates a new instance with the specified notifier and remote name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fire(CastEvent<?> event)
Fires the specified event on all the registered
CastEvent.CastEventListeners. |
Executor |
getNotifier() |
public ThreadedCastEventListenerList(@Nonnull Executor notifier, @Nonnull String remoteName)
notifier - the Executor that will invoke the listeners.remoteName - the identifier for the cast device used in logging.IllegalArgumentException - If notifier or
remoteName is null.public void fire(@Nullable CastEvent<?> event)
CastEvent.CastEventListenerListCastEvent.CastEventListeners.event - the CastEvent to fire.Copyright © 2022. All rights reserved.