Codota Logo
ChannelHandlerContext.read
Code IndexAdd Codota to your IDE (free)

How to use
read
method
in
io.netty.channel.ChannelHandlerContext

Best Java code snippets using io.netty.channel.ChannelHandlerContext.read (Showing top 20 results out of 459)

  • Common ways to obtain ChannelHandlerContext
private void myMethod () {
ChannelHandlerContext c =
  • Codota IconMockito mockito;mockito.mock(ChannelHandlerContext.class)
  • Smart code suggestions by Codota
}
origin: netty/netty

/**
 * 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();
}
origin: netty/netty

/**
 * 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();
}
origin: netty/netty

@Override
public ChannelHandlerContext read() {
  ctx.read();
  return this;
}
origin: eclipse-vertx/vert.x

@Override
public ChannelHandlerContext read() {
 ctx.read();
 return this;
}
origin: redisson/redisson

@Override
public void read(ChannelHandlerContext ctx) throws Exception {
  if (suppressRead) {
    readPending = true;
  } else {
    ctx.read();
  }
}
origin: redisson/redisson

/**
 * 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();
}
origin: redisson/redisson

@Override
public ChannelHandlerContext read() {
  ctx.read();
  return this;
}
origin: redisson/redisson

/**
 * 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();
}
origin: AsyncHttpClient/async-http-client

@Override
public void channelActive(ChannelHandlerContext ctx) {
 ctx.read();
}
origin: redisson/redisson

@Override
public void read(ChannelHandlerContext ctx) throws Exception {
  if (!handshakePromise.isDone()) {
    readDuringHandshake = true;
  }
  ctx.read();
}
origin: redisson/redisson

@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();
  }
}
origin: redisson/redisson

@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();
  }
}
origin: netty/netty

@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();
}
origin: AsyncHttpClient/async-http-client

@Override
public void channelReadComplete(ChannelHandlerContext ctx) {
 if (!isHandledByReactiveStreams(ctx)) {
  ctx.read();
 } else {
  ctx.fireChannelReadComplete();
 }
}
origin: wildfly/wildfly

private static void readIfNeeded(ChannelHandlerContext ctx) {
  if (!ctx.channel().config().isAutoRead()) {
    ctx.read();
  }
}
origin: netty/netty

@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
  numReads = 0;
  discardSomeReadBytes();
  if (decodeWasNull) {
    decodeWasNull = false;
    if (!ctx.channel().config().isAutoRead()) {
      ctx.read();
    }
  }
  ctx.fireChannelReadComplete();
}
origin: redisson/redisson

@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();
}
origin: redisson/redisson

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();
  }
}
origin: redisson/redisson

/**
 * 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();
  }
}
origin: redisson/redisson

@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
  numReads = 0;
  discardSomeReadBytes();
  if (decodeWasNull) {
    decodeWasNull = false;
    if (!ctx.channel().config().isAutoRead()) {
      ctx.read();
    }
  }
  ctx.fireChannelReadComplete();
}
io.netty.channelChannelHandlerContextread

Popular methods of ChannelHandlerContext

  • channel
    Return the Channel which is bound to the ChannelHandlerContext.
  • close
  • writeAndFlush
  • write
  • flush
  • fireChannelRead
  • pipeline
    Return the assigned ChannelPipeline
  • alloc
    Return the assigned ByteBufAllocator which will be used to allocate ByteBufs.
  • executor
    Returns the EventExecutor which is used to execute an arbitrary task.
  • fireExceptionCaught
  • fireUserEventTriggered
  • newPromise
  • fireUserEventTriggered,
  • newPromise,
  • fireChannelActive,
  • fireChannelInactive,
  • voidPromise,
  • fireChannelReadComplete,
  • name,
  • attr,
  • disconnect

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now