T - the type of listeners.public class Listeners<T> extends Object implements Iterable<T>
Listeners.Notification.| Modifier and Type | Class and Description |
|---|---|
static interface |
Listeners.Notification<T> |
| Constructor and Description |
|---|
Listeners()
Construct new empty listeners;
|
Listeners(Listeners<T> other)
Construct a copy of the given listeners.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T listener)
Adds the specified listener to this container.
|
Iterator<T> |
iterator()
Returns the iterator over listeners in this container in the order they were added.
|
void |
notify(Executor executor,
Listeners.Notification<T> notification)
Notify all listeners in this container with the given notification using the given executor.
|
void |
notify(Listeners.Notification<T> notification)
Notify all listeners in this container with the given notification.
|
void |
remove(T listener)
Remove the first occurrence of the specified listener from this container, if it is present.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void add(T listener)
listener - the listener to add.public void remove(T listener)
listener - the listener to remove.public void notify(Listeners.Notification<T> notification)
notification - the notification to be applied to each listener.public void notify(Executor executor, Listeners.Notification<T> notification)
Runnable to the executor.
Notification of each listener is synchronized on this listener.executor - the executor to submit notifications to.notification - the notification to be applied to each listener.public Iterator<T> iterator()
The returned iterator provides a snapshot of the state of the list
when the iterator was constructed. No synchronization is needed while
traversing the iterator. The iterator does NOT support the
remove method.
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.