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

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

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

  • 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

@Override
public String name() {
  return ctx.name();
}
origin: eclipse-vertx/vert.x

@Override
public String name() {
 return ctx.name();
}
origin: redisson/redisson

@Override
public String name() {
  return ctx.name();
}
origin: wildfly/wildfly

@Override
public String name() {
  return ctx.name();
}
origin: traccar/traccar

@Override
public String name() {
  return context.name();
}
origin: wildfly/wildfly

private static void removeThisHandler(ChannelHandlerContext ctx) {
  ctx.pipeline().remove(ctx.name());
}
origin: wildfly/wildfly

@Override
protected void addCodec(ChannelHandlerContext ctx) throws Exception {
  ChannelPipeline p = ctx.pipeline();
  String name = ctx.name();
  p.addBefore(name, null, codec);
}
origin: line/armeria

@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
  super.handlerAdded(ctx);
  name = ctx.name();
}
origin: wildfly/wildfly

  @Override
  public void operationComplete(ChannelFuture future) throws Exception {
    if (future.isSuccess()) {
      for (WebSocketServerExtension extension : validExtensions) {
        WebSocketExtensionDecoder decoder = extension.newExtensionDecoder();
        WebSocketExtensionEncoder encoder = extension.newExtensionEncoder();
        ctx.pipeline().addAfter(ctx.name(), decoder.getClass().getName(), decoder);
        ctx.pipeline().addAfter(ctx.name(), encoder.getClass().getName(), encoder);
      }
    }
    ctx.pipeline().remove(ctx.name());
  }
});
origin: wildfly/wildfly

  @Override
  public void handlerAdded(ChannelHandlerContext ctx) {
    ChannelPipeline cp = ctx.pipeline();
    if (cp.get(WebSocketClientProtocolHandshakeHandler.class) == null) {
      // Add the WebSocketClientProtocolHandshakeHandler before this one.
      ctx.pipeline().addBefore(ctx.name(), WebSocketClientProtocolHandshakeHandler.class.getName(),
          new WebSocketClientProtocolHandshakeHandler(handshaker));
    }
    if (cp.get(Utf8FrameValidator.class) == null) {
      // Add the UFT8 checking before this one.
      ctx.pipeline().addBefore(ctx.name(), Utf8FrameValidator.class.getName(),
          new Utf8FrameValidator());
    }
  }
}
origin: wildfly/wildfly

@Override
public void upgradeTo(ChannelHandlerContext ctx, FullHttpResponse upgradeResponse)
    throws Exception {
  // Add the handler to the pipeline.
  ctx.pipeline().addAfter(ctx.name(), handlerName, upgradeToHandler);
  // Reserve local stream 1 for the response.
  connectionHandler.onHttpClientUpgrade();
}
origin: alipay/sofa-rpc

@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
  ctx.pipeline()
    .addBefore(ctx.name(), null, new Http2ServerUpgradeHandler.PriorKnowledgeHandler())
    .addBefore(ctx.name(), "HttpServerCodec", httpServerCodec)
    .replace(this, "HttpServerUpgradeHandler", httpServerUpgradeHandler);
}
origin: alipay/sofa-rpc

@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
  ctx.pipeline()
    .addBefore(ctx.name(), null, new Http2ServerUpgradeHandler.PriorKnowledgeHandler())
    .addBefore(ctx.name(), "HttpServerCodec", httpServerCodec)
    .replace(this, "HttpServerUpgradeHandler", httpServerUpgradeHandler);
}
origin: wildfly/wildfly

@Override
protected void addCodec(ChannelHandlerContext ctx) throws Exception {
  ChannelPipeline p = ctx.pipeline();
  String name = ctx.name();
  Socks4ClientDecoder decoder = new Socks4ClientDecoder();
  p.addBefore(name, null, decoder);
  decoderName = p.context(decoder).name();
  encoderName = decoderName + ".encoder";
  p.addBefore(name, encoderName, Socks4ClientEncoder.INSTANCE);
}
origin: wildfly/wildfly

@Override
protected void addCodec(ChannelHandlerContext ctx) throws Exception {
  ChannelPipeline p = ctx.pipeline();
  String name = ctx.name();
  Socks5InitialResponseDecoder decoder = new Socks5InitialResponseDecoder();
  p.addBefore(name, null, decoder);
  decoderName = p.context(decoder).name();
  encoderName = decoderName + ".encoder";
  p.addBefore(name, encoderName, Socks5ClientEncoder.DEFAULT);
}
origin: wildfly/wildfly

@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
  ctx.pipeline()
    .addBefore(ctx.name(), null, new PriorKnowledgeHandler())
    .addBefore(ctx.name(), null, httpServerCodec)
    .replace(this, null, httpServerUpgradeHandler);
}
origin: line/armeria

  private String addAfter(ChannelPipeline p, String baseName, ChannelHandler handler) {
    p.addAfter(baseName, null, handler);
    return p.context(handler).name();
  }
}
origin: jooby-project/jooby

 private String addAfter(final ChannelPipeline p, final String baseName, final String name,
   final ChannelHandler h) {
  p.addAfter(baseName, name, h);
  return p.context(h).name();
 }
}
origin: line/armeria

void addBeforeSessionHandler(ChannelPipeline pipeline, ChannelHandler handler) {
  // Get the name of the HttpSessionHandler so that we can put our handlers before it.
  final ChannelHandlerContext lastContext = pipeline.lastContext();
  assert lastContext.handler().getClass() == HttpSessionHandler.class;
  pipeline.addBefore(lastContext.name(), null, handler);
}
origin: jersey/jersey

  @Override
  protected void channelRead0(ChannelHandlerContext ctx, HttpMessage msg) throws Exception {
    // If this handler is hit then no upgrade has been attempted and the client is just talking HTTP.
    // "Directly talking: " + msg.protocolVersion() + " (no upgrade was attempted)");
    ChannelPipeline pipeline = ctx.pipeline();
    ChannelHandlerContext thisCtx = pipeline.context(this);
    pipeline.addAfter(thisCtx.name(), null, new JerseyServerHandler(baseUri, container));
    pipeline.replace(this, null, new ChunkedWriteHandler());
    ctx.fireChannelRead(msg);
  }
});
io.netty.channelChannelHandlerContextname

Javadoc

The unique name of the ChannelHandlerContext.The name was used when then ChannelHandlerwas added to the ChannelPipeline. This name can also be used to access the registered ChannelHandler from the ChannelPipeline.

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,
  • read,
  • fireChannelReadComplete,
  • 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