Interface Channel
-
- All Known Subinterfaces:
BasicPacketChannel,PacketChannel,RawDataChannel
public interface ChannelRepresents a network channel bound to aChannelManager. The channel can be used to send and receive data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceKeykey()Gets this channel's bound key.ChannelManagermanager()Gets the manager that this channel is bound to.voidsetExceptionHandler(ChannelExceptionHandler<EngineConnection> handler)Sets theChannelExceptionHandlerthat should be used for the channel.
-
-
-
Method Detail
-
manager
ChannelManager manager()
Gets the manager that this channel is bound to.- Returns:
- The manager
-
key
ResourceKey key()
Gets this channel's bound key.- Returns:
- The channel key
-
setExceptionHandler
void setExceptionHandler(ChannelExceptionHandler<EngineConnection> handler)
Sets theChannelExceptionHandlerthat should be used for the channel.By default every
ChannelExceptionexcept forChannelNotSupportedExceptionwill be logged.- Parameters:
handler- The channel exception handler
-
-