/** * Calls {@link ChannelHandlerContext#read()} to forward * to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}. * * Sub-classes may override this method to change behavior. */ @Override public void read(ChannelHandlerContext ctx) throws Exception { ctx.read(); }
/** * Calls {@link ChannelHandlerContext#read()} to forward * to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}. * * Sub-classes may override this method to change behavior. */ @Override public void read(ChannelHandlerContext ctx) throws Exception { ctx.read(); }
@Override public ChannelHandlerContext read() { ctx.read(); return this; }
@Override public ChannelHandlerContext read() { ctx.read(); return this; }
/** * Calls {@link ChannelHandlerContext#read()} to forward * to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}. * * Sub-classes may override this method to change behavior. */ @Override public void read(ChannelHandlerContext ctx) throws Exception { ctx.read(); }
@Override public void read(ChannelHandlerContext ctx) throws Exception { if (suppressRead) { readPending = true; } else { ctx.read(); } }
@Override public ChannelHandlerContext read() { ctx.read(); return this; }
/** * Calls {@link ChannelHandlerContext#read()} to forward * to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}. * * Sub-classes may override this method to change behavior. */ @Override public void read(ChannelHandlerContext ctx) throws Exception { ctx.read(); }
@Override public void channelActive(ChannelHandlerContext ctx) { ctx.read(); }
@Override public void read(ChannelHandlerContext ctx) throws Exception { if (!handshakePromise.isDone()) { readDuringHandshake = true; } ctx.read(); }
@Override public void read(ChannelHandlerContext ctx) throws Exception { if (dequeue(ctx, 1) == 0) { // It seems no messages were consumed. We need to read() some // messages from upstream and once one arrives it need to be // relayed to downstream to keep the flow going. shouldConsume = true; ctx.read(); } }
@Override public void read(ChannelHandlerContext ctx) { if (isHandlerActive(ctx)) { // For Global Traffic (and Read when using EventLoop in pipeline) : check if READ_SUSPENDED is False ctx.read(); } }
@Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { // We might need keep reading the channel until the full message is aggregated. // // See https://github.com/netty/netty/issues/6583 if (currentMessage != null && !ctx.channel().config().isAutoRead()) { ctx.read(); } ctx.fireChannelReadComplete(); }
@Override public void channelReadComplete(ChannelHandlerContext ctx) { if (!isHandledByReactiveStreams(ctx)) { ctx.read(); } else { ctx.fireChannelReadComplete(); } }
private static void readIfNeeded(ChannelHandlerContext ctx) { if (!ctx.channel().config().isAutoRead()) { ctx.read(); } }
@Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { numReads = 0; discardSomeReadBytes(); if (decodeWasNull) { decodeWasNull = false; if (!ctx.channel().config().isAutoRead()) { ctx.read(); } } ctx.fireChannelReadComplete(); }
private void readIfNeeded(ChannelHandlerContext ctx) { // If handshake is not finished yet, we need more data. if (!ctx.channel().config().isAutoRead() && (!firedChannelRead || !handshakePromise.isDone())) { // No auto-read used and no message passed through the ChannelPipeline or the handshake was not complete // yet, which means we need to trigger the read to ensure we not encounter any stalls. ctx.read(); } }
@Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { // We might need keep reading the channel until the full message is aggregated. // // See https://github.com/netty/netty/issues/6583 if (currentMessage != null && !ctx.channel().config().isAutoRead()) { ctx.read(); } ctx.fireChannelReadComplete(); }
/** * Notify all the handshake futures about the successfully handshake */ private void setHandshakeSuccess() { handshakePromise.trySuccess(ctx.channel()); if (logger.isDebugEnabled()) { logger.debug("{} HANDSHAKEN: {}", ctx.channel(), engine.getSession().getCipherSuite()); } ctx.fireUserEventTriggered(SslHandshakeCompletionEvent.SUCCESS); if (readDuringHandshake && !ctx.channel().config().isAutoRead()) { readDuringHandshake = false; ctx.read(); } }
@Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { numReads = 0; discardSomeReadBytes(); if (decodeWasNull) { decodeWasNull = false; if (!ctx.channel().config().isAutoRead()) { ctx.read(); } } ctx.fireChannelReadComplete(); }