Package com.facebook.presto.jdbc.internal.netty.channel

Examples of com.facebook.presto.jdbc.internal.netty.channel.ChannelPipeline.addLast()


    protected void addHttpHandlers(ChannelHandlerContext ctx) {
        ChannelPipeline pipeline = ctx.getPipeline();
        pipeline.addLast("httpRquestDecoder", new HttpRequestDecoder());
        pipeline.addLast("httpResponseEncoder", new HttpResponseEncoder());
        pipeline.addLast("httpChunkAggregator", new HttpChunkAggregator(maxHttpContentLength));
        pipeline.addLast("httpRquestHandler", createHttpRequestHandlerForHttp());
    }

    /**
     * Create the {@link ChannelUpstreamHandler} that is responsible for handling the {@link HttpRequest}'s
     * when the {@link SelectedProtocol} was {@link SelectedProtocol#HttpVersion1_0} or
View Full Code Here


        }
        Binder binder = new Binder(localAddress);
        ChannelHandler parentHandler = getParentHandler();

        ChannelPipeline bossPipeline = pipeline();
        bossPipeline.addLast("binder", binder);
        if (parentHandler != null) {
            bossPipeline.addLast("userHandler", parentHandler);
        }

        Channel channel = getFactory().newChannel(bossPipeline);
View Full Code Here

        ChannelHandler parentHandler = getParentHandler();

        ChannelPipeline bossPipeline = pipeline();
        bossPipeline.addLast("binder", binder);
        if (parentHandler != null) {
            bossPipeline.addLast("userHandler", parentHandler);
        }

        Channel channel = getFactory().newChannel(bossPipeline);
        final ChannelFuture bfuture = new DefaultChannelFuture(channel, false);
        binder.bindFuture.addListener(new ChannelFutureListener() {
View Full Code Here

                    LinkedHashMap.class.getName() + '.');
        }

        ChannelPipeline pipeline = pipeline();
        for (Map.Entry<String, ChannelHandler> e: pipelineMap.entrySet()) {
            pipeline.addLast(e.getKey(), e.getValue());
        }

        setPipeline(pipeline);
    }
View Full Code Here

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                final ChannelPipeline cp = Channels.pipeline();
                cp.addLast(FRAME_DECODER, new FixedLengthFrameDecoder(8));
                cp.addLast(HANDSHAKE, new Socks4HandshakeHandler(Socks4ClientBootstrap.super.getPipelineFactory()));
                return cp;
            }
        };
    }
View Full Code Here

            public ChannelPipeline getPipeline()
                    throws Exception
            {
                final ChannelPipeline cp = Channels.pipeline();
                cp.addLast(FRAME_DECODER, new FixedLengthFrameDecoder(8));
                cp.addLast(HANDSHAKE, new Socks4HandshakeHandler(Socks4ClientBootstrap.super.getPipelineFactory()));
                return cp;
            }
        };
    }
View Full Code Here

    {
        // Create a default pipeline implementation.
        ChannelPipeline pipeline = pipeline();

        // timeout read requests
        pipeline.addLast("timeout", timeoutHandler);

        // read and write http messages
        pipeline.addLast("codec", new HttpClientCodec());

        // decompress gzip responses
View Full Code Here

        // timeout read requests
        pipeline.addLast("timeout", timeoutHandler);

        // read and write http messages
        pipeline.addLast("codec", new HttpClientCodec());

        // decompress gzip responses
        pipeline.addLast("inflater", new HttpContentDecompressor());

        // gather all chunks into a single http message
View Full Code Here

        // read and write http messages
        pipeline.addLast("codec", new HttpClientCodec());

        // decompress gzip responses
        pipeline.addLast("inflater", new HttpContentDecompressor());

        // gather all chunks into a single http message
        pipeline.addLast("aggregator", new HttpChunkAggregator(maxContentLength));

        // move response handler to user worker pool
View Full Code Here

        // decompress gzip responses
        pipeline.addLast("inflater", new HttpContentDecompressor());

        // gather all chunks into a single http message
        pipeline.addLast("aggregator", new HttpChunkAggregator(maxContentLength));

        // move response handler to user worker pool
        pipeline.addLast("pipelineExecutor", new ExecutionHandler(executor));

        // response handler
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.