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 com.qq.servlet.demo.netty.sample.http.helloworld.HttpHelloWorldServerInitializer.java

public class HttpHelloWorldServerInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline p = ch.pipeline();

        // Uncomment the following line if you want HTTPS

From source file com.qq.servlet.demo.netty.sample.proxy.HexDumpProxyInitializer.java

public class HexDumpProxyInitializer extends ChannelInitializer<SocketChannel> {

    private final String remoteHost;
    private final int remotePort;

    public HexDumpProxyInitializer(String remoteHost, int remotePort) {

From source file com.qq.servlet.demo.netty.sample.socksproxy.DirectClientInitializer.java

public final class DirectClientInitializer extends ChannelInitializer<SocketChannel> {

    private final Promise promise;

    public DirectClientInitializer(Promise promise) {
        this.promise = promise;

From source file com.qq.servlet.demo.netty.sample.socksproxy.SocksServerInitializer.java

public final class SocksServerInitializer extends ChannelInitializer<SocketChannel> {
    private final SocksMessageEncoder socksMessageEncoder = new SocksMessageEncoder();
    private final SocksServerHandler socksServerHandler = new SocksServerHandler();

    @Override
    public void initChannel(SocketChannel socketChannel) throws Exception {

From source file com.qq.servlet.demo.netty.sample.telnet.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();
    private static final StringEncoder ENCODER = new StringEncoder();

From source file com.qq.servlet.demo.netty.sample.telnet.TelnetServerInitializer.java

/**
 * Creates a newly configured {@link ChannelPipeline} for a new channel.
 */
public class TelnetServerInitializer extends ChannelInitializer<SocketChannel> {
    private static final StringDecoder DECODER = new StringDecoder();
    private static final StringEncoder ENCODER = new StringEncoder();

From source file com.qq.servlet.demo.netty.telnet.client.ClientInitializer.java

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

    private static final StringDecoder DECODER = new StringDecoder();

From source file com.qq.servlet.demo.netty.telnet.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 com.qq.servlet.demo.netty.telnet.TelnetServerInitializer.java

/**
 * Creates a newly configured {@link ChannelPipeline} for a new channel.
 */
public class TelnetServerInitializer extends ChannelInitializer<SocketChannel> {
    private static final StringDecoder DECODER = new StringDecoder();
    private static final StringEncoder ENCODER = new StringEncoder();

From source file com.qq.servlet.demo.thrift.netty.client.NettyThriftClientInitializer.java

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

    //    private static final NettyThriftClientHandler CLIENTHANDLER = new NettyThriftClientHandler();