Package io.netty.channel

Examples of io.netty.channel.ChannelPipeline.addLast()


    private void enableSsl(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
        SSLEngine engine = SSLFactory.getInstance().sslContext().createSSLEngine();
        engine.setUseClientMode(false);
        pipeline.addLast("ssl", new SslHandler(engine));

        // re-unify
        pipeline.addLast("sslUnification", new ProxyUnificationHandler(false, socksEnabled, port));
        pipeline.remove(this);
    }
View Full Code Here


        SSLEngine engine = SSLFactory.getInstance().sslContext().createSSLEngine();
        engine.setUseClientMode(false);
        pipeline.addLast("ssl", new SslHandler(engine));

        // re-unify
        pipeline.addLast("sslUnification", new ProxyUnificationHandler(false, socksEnabled, port));
        pipeline.remove(this);
    }

    private void enableSocks(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
View Full Code Here

        pipeline.remove(this);
    }

    private void enableSocks(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
        pipeline.addLast(SocksInitRequestDecoder.class.getSimpleName(), new SocksInitRequestDecoder());
        pipeline.addLast(SocksMessageEncoder.class.getSimpleName(), new SocksMessageEncoder());
        pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));

        // re-unify
        pipeline.addLast("socksUnification", new ProxyUnificationHandler(sslEnabled, false, port));
View Full Code Here

    }

    private void enableSocks(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
        pipeline.addLast(SocksInitRequestDecoder.class.getSimpleName(), new SocksInitRequestDecoder());
        pipeline.addLast(SocksMessageEncoder.class.getSimpleName(), new SocksMessageEncoder());
        pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));

        // re-unify
        pipeline.addLast("socksUnification", new ProxyUnificationHandler(sslEnabled, false, port));
        pipeline.remove(this);
View Full Code Here

    private void enableSocks(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
        pipeline.addLast(SocksInitRequestDecoder.class.getSimpleName(), new SocksInitRequestDecoder());
        pipeline.addLast(SocksMessageEncoder.class.getSimpleName(), new SocksMessageEncoder());
        pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));

        // re-unify
        pipeline.addLast("socksUnification", new ProxyUnificationHandler(sslEnabled, false, port));
        pipeline.remove(this);
    }
View Full Code Here

        pipeline.addLast(SocksInitRequestDecoder.class.getSimpleName(), new SocksInitRequestDecoder());
        pipeline.addLast(SocksMessageEncoder.class.getSimpleName(), new SocksMessageEncoder());
        pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));

        // re-unify
        pipeline.addLast("socksUnification", new ProxyUnificationHandler(sslEnabled, false, port));
        pipeline.remove(this);
    }

    private void switchToHttp(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
View Full Code Here

        pipeline.remove(this);
    }

    private void switchToHttp(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
        pipeline.addLast(HttpServerCodec.class.getSimpleName(), new HttpServerCodec());
        pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));
        pipeline.remove(this);
    }
}
View Full Code Here

    }

    private void switchToHttp(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.pipeline();
        pipeline.addLast(HttpServerCodec.class.getSimpleName(), new HttpServerCodec());
        pipeline.addLast(HttpProxyHandler.class.getSimpleName(), new HttpProxyHandler(logFilter, null, new InetSocketAddress(port), sslEnabled));
        pipeline.remove(this);
    }
}
View Full Code Here

        // add HTTPS support
        if (secure) {
            SSLEngine engine = SSLFactory.getInstance().sslContext().createSSLEngine();
            engine.setUseClientMode(false);
            pipeline.addLast("ssl", new SslHandler(engine));
        }

        // add logging
        if (logger.isDebugEnabled()) {
            pipeline.addLast("logger", new LoggingHandler());
View Full Code Here

            pipeline.addLast("ssl", new SslHandler(engine));
        }

        // add logging
        if (logger.isDebugEnabled()) {
            pipeline.addLast("logger", new LoggingHandler());
        }

        // add msg <-> HTTP
        pipeline.addLast("decoder-encoder", new HttpServerCodec());
        pipeline.addLast("chunk-aggregator", new HttpObjectAggregator(Integer.MAX_VALUE));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.