Example usage for io.netty.channel ChannelInitializer subclass-usage

List of usage examples for io.netty.channel ChannelInitializer subclass-usage

Introduction

In this page you can find the example usage for io.netty.channel ChannelInitializer subclass-usage.

Usage

From source file HttpUploadClientIntializer.java

public class HttpUploadClientIntializer extends ChannelInitializer<SocketChannel> {

    private final SslContext sslCtx;

    public HttpUploadClientIntializer(SslContext sslCtx) {
        this.sslCtx = sslCtx;

From source file HttpRouterServerInitializer.java

public class HttpRouterServerInitializer extends ChannelInitializer<SocketChannel> {
    private final HttpRouterServerHandler handler;
    private final BadClientSilencer badClientSilencer = new BadClientSilencer();

    public HttpRouterServerInitializer(Router router) {
        handler = new HttpRouterServerHandler(router);

From source file Http2ClientInitializer.java

/**
 * Configures the client pipeline to support HTTP/2 frames.
 */
public class Http2ClientInitializer extends ChannelInitializer<SocketChannel> {

    private final SslContext sslCtx;

From source file Http2ServerInitializer.java

/**
 * Sets up the Netty pipeline for the example server. Depending on the endpoint config, sets up the
 * pipeline for NPN or cleartext HTTP upgrade to HTTP/2.
 */
public class Http2ServerInitializer extends ChannelInitializer<SocketChannel> {

From source file SecureChatServerInitializer.java

/**
 * Creates a newly configured {@link ChannelPipeline} for a new channel.
 */
public class SecureChatServerInitializer extends ChannelInitializer<SocketChannel> {

    private final SslContext sslCtx;

From source file WorldClockClientInitializer.java

public class WorldClockClientInitializer extends ChannelInitializer<SocketChannel> {

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline p = ch.pipeline();
        p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());

From source file HttpUploadServerInitializer.java

public class HttpUploadServerInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        // Create a default pipeline implementation.
        ChannelPipeline pipeline = ch.pipeline();

From source file WorldClockServerInitializer.java

public class WorldClockServerInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline p = ch.pipeline();
        p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
        p.addLast("protobufDecoder", new ProtobufDecoder(NetworkMessage.PackageInformation.getDefaultInstance()));

From source file TelnetClientInitializer.java

/**
 * Creates a newly configured {@link ChannelPipeline} for a new channel.
 */
public class TelnetClientInitializer extends ChannelInitializer<SocketChannel> {

    private static final StringDecoder DECODER = new StringDecoder();

From source file NettyHttpTransportHandlerInitializer.java

/**
 * register event handlers in the pipeline
 */
public class NettyHttpTransportHandlerInitializer extends ChannelInitializer<SocketChannel> {

    private String host;