Interface Channel
-
- All Known Subinterfaces:
BasicPacketChannel
,PacketChannel
,RawDataChannel
public interface Channel
Represents 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 ResourceKey
key()
Gets this channel's bound key.ChannelManager
manager()
Gets the manager that this channel is bound to.void
setExceptionHandler(ChannelExceptionHandler<EngineConnection> handler)
Sets theChannelExceptionHandler
that 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 theChannelExceptionHandler
that should be used for the channel.By default every
ChannelException
except forChannelNotSupportedException
will be logged.- Parameters:
handler
- The channel exception handler
-
-