Modifier and Type | Class and Description |
---|---|
class |
Listeners.ListenerHolder
The listener holder with messaging context.
|
Constructor and Description |
---|
Listeners()
Empty constructor to construct
Listeners . |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
accept(T event)
Accepts an event.
|
Listener<T> |
add(java.util.function.Consumer<T> listener)
Adds a new listener.
|
Iterator<Listener<T>> |
iterator() |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Listeners()
Listeners
.public int size()
public Listener<T> add(java.util.function.Consumer<T> listener)
listener
- the listener to addpublic CompletableFuture<Void> accept(T event)
event
- the event to acceptCopyright © 2023. All Rights Reserved.