T - the channel message typepublic interface ChannelAgent<T> extends Terminable
Channels message streams.EMPTY| Modifier and Type | Method and Description |
|---|---|
boolean |
addListener(ChannelListener<T> listener)
Adds a new listener to the channel;
|
void |
close()
Closes this resource.
|
Channel<T> |
getChannel()
Gets the channel this agent is acting for.
|
Set<ChannelListener<T>> |
getListeners()
Gets an immutable copy of the listeners currently held by this agent.
|
boolean |
hasListeners()
Gets if this agent has any active listeners.
|
boolean |
removeListener(ChannelListener<T> listener)
Removes a listener from the channel.
|
bindWith, closeAndReportException, closeSilently, isClosed@Nonnull Channel<T> getChannel()
@Nonnull Set<ChannelListener<T>> getListeners()
boolean hasListeners()
boolean addListener(@Nonnull ChannelListener<T> listener)
listener - the listener to addboolean removeListener(@Nonnull ChannelListener<T> listener)
listener - the listener to removevoid close()
Terminableclose in interface AutoCloseableclose in interface TerminableCopyright © 2020. All rights reserved.