M - public abstract class AbstractListenerHandler<M,L extends JConnectionListener<M>> extends io.netty.channel.ChannelInboundHandlerAdapter implements MsgListenerHandler
| 构造器和说明 |
|---|
AbstractListenerHandler(L listener) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected JConnection |
buildConnection(io.netty.channel.ChannelHandlerContext ctx)
创建一个链接实例
|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx)
放于心跳handler和解码器后面
|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
到达业务线程后需要注意msg被释放的问题
|
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected JConnection |
findConnection(io.netty.channel.Channel channel)
查找链接
|
channelReadComplete, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected final L extends JConnectionListener<M> listener
public AbstractListenerHandler(L listener)
public final void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelRegistered 在接口中 io.netty.channel.ChannelInboundHandlerchannelRegistered 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic final void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelUnregistered 在接口中 io.netty.channel.ChannelInboundHandlerchannelUnregistered 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic final void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive 在接口中 io.netty.channel.ChannelInboundHandlerchannelActive 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic final void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead 在接口中 io.netty.channel.ChannelInboundHandlerchannelRead 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic final void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive 在接口中 io.netty.channel.ChannelInboundHandlerchannelInactive 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic final void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught 在接口中 io.netty.channel.ChannelHandlerexceptionCaught 在接口中 io.netty.channel.ChannelInboundHandlerexceptionCaught 在类中 io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected JConnection buildConnection(io.netty.channel.ChannelHandlerContext ctx)
protected JConnection findConnection(io.netty.channel.Channel channel)
channel - Copyright © 2020. All rights reserved.