public interface ChannelInboundHandler extends ChannelBoundHandler
| 限定符和类型 | 方法和说明 |
|---|---|
void |
channelAdded(SocketChannel socketChannel)
连接
|
void |
channelClosed(SocketChannel socketChannel)
连接关闭
|
void |
channelRead(SocketChannel socketChannel,
Object obj)
消息读取
|
void |
decode(SocketChannel socketChannel,
Object obj,
LinkedNonReadBlockQueue<Object> out)
消息解码
|
void |
exceptionCaught(SocketChannel socketChannel,
Throwable cause)
异常
|
channelWrite, encode, userEventTriggeredvoid channelAdded(SocketChannel socketChannel) throws Exception
channelAdded 在接口中 ChannelBoundHandlersocketChannel - 通道Exception - 异常void channelClosed(SocketChannel socketChannel) throws Exception
channelClosed 在接口中 ChannelBoundHandlersocketChannel - 通道Exception - 异常void channelRead(SocketChannel socketChannel, Object obj) throws Exception
channelRead 在接口中 ChannelBoundHandlerobj - 读取消息socketChannel - 通道Exception - 异常void exceptionCaught(SocketChannel socketChannel, Throwable cause) throws Exception
exceptionCaught 在接口中 ChannelBoundHandlersocketChannel - 通道cause - 异常信息Exception - 异常void decode(SocketChannel socketChannel, Object obj, LinkedNonReadBlockQueue<Object> out) throws Exception
decode 在接口中 ChannelBoundHandlersocketChannel - 通道obj - 消息out - 消息队列Exception - 异常Copyright © 2021. All rights reserved.