T - the channel message typepublic interface Channel<T> extends TypeAware<T>
Channels can be subscribed to through a ChannelAgent.
| Modifier and Type | Method and Description |
|---|---|
Codec<T> |
getCodec()
Gets the channels codec.
|
String |
getName()
Gets the name of the channel.
|
TypeToken<T> |
getType()
Gets the channels message type.
|
ChannelAgent<T> |
newAgent()
Creates a new
ChannelAgent for this channel. |
Promise<Void> |
sendMessage(T message)
Sends a new message to the channel.
|
@Nonnull ChannelAgent<T> newAgent()
ChannelAgent for this channel.@Nonnull Promise<Void> sendMessage(@Nonnull T message)
This method will return immediately, and the future will be completed once the message has been sent.
message - the message to dispatchCopyright © 2018. All rights reserved.