T - event typepublic interface Listener<T> extends Consumer<T>, AutoCloseable
The listener context represents a registered listener. The context is normally returned when a Consumer is
registered and can be used to unregister the listener via close().
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the listener.
|
void close()
When the listener is closed, the listener will be unregistered and will no longer receive events for which it was listening.
close in interface AutoCloseableCopyright © 2013–2016. All rights reserved.