| Constructor and Description |
|---|
Audience()
Initializes a new instance that synchronously sends messages to the
registered listeners.
|
Audience(Executor executor)
|
| Modifier and Type | Method and Description |
|---|---|
<M> void |
add(Channel<M> channel,
Consumer<? super M> listener)
Registers a listener with this registry to receive messages that are triggered based on a specific
event.
|
<M> void |
send(Channel<M> channel,
M message)
Sends a given message to all listeners that have registered
for the given
Channel. |
public Audience()
public Audience(Executor executor)
public final <M> void add(Channel<M> channel, Consumer<? super M> listener)
Registrypublic final <M> void send(Channel<M> channel, M message)
Channel.M - The message type.Copyright © 2025 Andreas Kluge-Kaindl, Bremen (de). All rights reserved.