List of usage examples for io.netty.channel ChannelInboundHandlerAdapter subclass-usage
From source file com.leiui.niodemo.http.netty.HttpHelloWorldServerHandler.java
public class HttpHelloWorldServerHandler extends ChannelInboundHandlerAdapter { private static final byte[] CONTENT = { 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd' }; @Override public void channelReadComplete(ChannelHandlerContext ctx) { ctx.flush();
From source file com.linecorp.armeria.internal.ConnectionLimitingHandler.java
/** * Limit the number of open connections to the configured value. * {@link ConnectionLimitingHandler} instance would be set to {@link ServerBootstrap#handler(ChannelHandler)}. */ @Sharable public final class ConnectionLimitingHandler extends ChannelInboundHandlerAdapter {
From source file com.linecorp.armeria.server.http.HttpServerHandler.java
final class HttpServerHandler extends ChannelInboundHandlerAdapter implements HttpServer { private static final Logger logger = LoggerFactory.getLogger(HttpServerHandler.class); private static final String ERROR_CONTENT_TYPE = MediaType.PLAIN_TEXT_UTF_8.toString();
From source file com.linecorp.armeria.server.HttpServerHandler.java
final class HttpServerHandler extends ChannelInboundHandlerAdapter implements HttpServer { private static final Logger logger = LoggerFactory.getLogger(HttpServerHandler.class); private static final MediaType ERROR_CONTENT_TYPE = MediaType.PLAIN_TEXT_UTF_8;
From source file com.linkedin.r2.transport.http.client.ChannelPoolHandler.java
/**
* Listens for upstream events affecting the state of the channel as it relates to the pool.
* This handler does not call super because it expects to be the last handler in the pipeline,
* to ensure that every other handler has had a chance to process the event and finish with
* the channel.
*
From source file com.linkedin.r2.transport.http.client.ChannelPoolStreamHandler.java
/**
* Listens for upstream events affecting the state of the channel as it relates to the pool.
* This handler does not call super because it expects to be the last handler in the pipeline,
* to ensure that every other handler has had a chance to process the event and finish with
* the channel.
*
From source file com.linkedin.r2.transport.http.client.Http2ChannelPoolHandler.java
/**
* Handles {@link AsyncPoolHandle} and releases the wrapped channel back to the {@link AsyncPool}.
*
* This handler does not call super because it expects to be the last handler in the pipeline,
* to ensure that every other handler has had a chance to process the event and finish with
* the channel.
From source file com.linkedin.r2.transport.http.client.Http2StreamResponseHandler.java
/**
* Netty pipeline handler which takes a complete received message and invokes the user-specified callback.
*
* Note that an instance of this class needs to be stateless, since a single instance is used in multiple
* {@link io.netty.channel.ChannelPipeline}s simultaneously. The user specified callback is expected to be
* pass in through a {@link com.linkedin.r2.transport.common.bridge.common.ResponseWithCallback} as a
From source file com.look.netty.demo.sctp.SctpEchoClientHandler.java
/** * Handler implementation for the SCTP echo client. It initiates the ping-pong * traffic between the echo client and server by sending the first message to * the server. */ public class SctpEchoClientHandler extends ChannelInboundHandlerAdapter {
From source file com.look.netty.demo.sctp.SctpEchoServerHandler.java
/** * Handler implementation for the SCTP echo server. */ @Sharable public class SctpEchoServerHandler extends ChannelInboundHandlerAdapter {