@ChannelHandler.Sharable
public class TransactionHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
构造器和说明 |
---|
TransactionHandler(Executor threadPool,
NettyControlService nettyControlService,
int delay) |
限定符和类型 | 方法和说明 |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
当客户端的所有ChannelHandler中4s内没有write事件,则会触发userEventTriggered方法
|
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public TransactionHandler(Executor threadPool, NettyControlService nettyControlService, int delay)
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
channelRead
在接口中 io.netty.channel.ChannelInboundHandler
channelRead
在类中 io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
在接口中 io.netty.channel.ChannelHandler
exceptionCaught
在接口中 io.netty.channel.ChannelInboundHandler
exceptionCaught
在类中 io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
在接口中 io.netty.channel.ChannelInboundHandler
channelInactive
在类中 io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
在接口中 io.netty.channel.ChannelInboundHandler
channelActive
在类中 io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
userEventTriggered
在接口中 io.netty.channel.ChannelInboundHandler
userEventTriggered
在类中 io.netty.channel.ChannelInboundHandlerAdapter
ctx
- 管道evt
- 状态Exception
- 异常数据Copyright © 2020. All rights reserved.