Package org.ldaptive.transport.netty
Class AutoReadFlowControlHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelDuplexHandler
-
- org.ldaptive.transport.netty.AutoReadFlowControlHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
final class AutoReadFlowControlHandler extends io.netty.channel.ChannelDuplexHandlerKeeps a counter of messages that have been sent down the pipeline. That counter is decremented whenever a read is requested. A read is only propagated to the channel when all messages have completed. This handler is intended to be used withNettyConnection.AutoReadEventHandler.
-
-
Field Summary
Fields Modifier and Type Field Description private LoggerloggerLogger for this class.private AtomicIntegermessageCountNumber of messages in the pipeline.
-
Constructor Summary
Constructors Constructor Description AutoReadFlowControlHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)voidread(io.netty.channel.ChannelHandlerContext ctx)-
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, write
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
logger
private final Logger logger
Logger for this class.
-
messageCount
private final AtomicInteger messageCount
Number of messages in the pipeline.
-
-