Examples of HttpClientCodec


Examples of io.netty.handler.codec.http.HttpClientCodec

    /**
     * Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.
     */
    private void configureClearText(SocketChannel ch) {
        HttpClientCodec sourceCodec = new HttpClientCodec();
        Http2ClientUpgradeCodec upgradeCodec = new Http2ClientUpgradeCodec(connectionHandler);
        HttpClientUpgradeHandler upgradeHandler = new HttpClientUpgradeHandler(sourceCodec, upgradeCodec, 65536);

        ch.pipeline().addLast("Http2SourceCodec", sourceCodec);
        ch.pipeline().addLast("Http2UpgradeHandler", upgradeHandler);
View Full Code Here

Examples of io.netty.handler.codec.http.HttpClientCodec

              }

              if (httpUpgradeEnabled)
              {
                 // prepare to handle a HTTP 101 response to upgrade the protocol.
                 final HttpClientCodec httpClientCodec = new HttpClientCodec();
                 pipeline.addLast(httpClientCodec);
                 pipeline.addLast("http-upgrade", new HttpUpgradeHandler(pipeline, httpClientCodec));
              }
              pipeline.addLast(new HornetQFrameDecoder2());
View Full Code Here

Examples of io.netty.handler.codec.http.HttpClientCodec

        ChannelPipeline pipeline = ch.pipeline();
        if (options.isSsl()) {
          pipeline.addLast("ssl", sslHelper.createSslHandler(vertx, true, host, port));
        }

        pipeline.addLast("codec", new HttpClientCodec(4096, 8192, 8192, false, false));
        if (options.isTryUseCompression()) {
          pipeline.addLast("inflater", new HttpContentDecompressor(true));
        }
        if (options.getIdleTimeout() > 0) {
          pipeline.addLast("idle", new IdleStateHandler(0, 0, options.getIdleTimeout()));
View Full Code Here

Examples of io.netty.handler.codec.http.HttpClientCodec

                    .channel(NioSocketChannel.class)
                    .handler(new ChannelInitializer<SocketChannel>() {
                        @Override
                        public void initChannel(SocketChannel ch) throws Exception {
                            ChannelPipeline pipeline = ch.pipeline();
                            pipeline.addLast("http-codec", new HttpClientCodec());
                            pipeline.addLast("aggregator", new HttpObjectAggregator(8192));
                            pipeline.addLast("ws-handler", handler);
                        }
                    });
View Full Code Here

Examples of io.netty.handler.codec.http.HttpClientCodec

                                    uri, WebSocketVersion.V13, null, false, customHeaders));
            b.group(group).channel(NioSocketChannel.class).handler(new ChannelInitializer<SocketChannel>() {
                @Override
                public void initChannel(SocketChannel ch) throws Exception {
                    ChannelPipeline pipeline = ch.pipeline();
                    pipeline.addLast("http-codec", new HttpClientCodec());
                    pipeline.addLast("aggregator", new HttpObjectAggregator(8192));
                    pipeline.addLast("ws-handler", handler);
                }
            });
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpClientCodec

    @Override
    public ChannelPipeline getPipeline() throws Exception
    {
      ChannelPipeline pipeline = new DefaultChannelPipeline();
      pipeline.addLast("codec", new HttpClientCodec());
      pipeline.addLast("aggregator", new HttpChunkAggregator( 1024 * 1024));
      pipeline.addLast("responseHandler", _handler);
      return pipeline;
    }
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpClientCodec

      public ChannelPipeline getPipeline() throws Exception
      {
        ChannelPipeline clientPipeline = pipeline();

        clientPipeline.addLast("client logger 1", new LoggingHandler("client logger 1", InternalLogLevel.DEBUG, true));
        clientPipeline.addLast("codec", new HttpClientCodec());
        clientPipeline.addLast("aggregator", new FooterAwareHttpChunkAggregator(1000000));
        _responseHandler = new SimpleHttpResponseHandler();
        clientPipeline.addLast("handler", _responseHandler);
        clientPipeline.addLast("client logger 5", new LoggingHandler("client logger 5", InternalLogLevel.DEBUG, true));
        return clientPipeline;
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpClientCodec

                                         _timeoutTimer,
                                         _readTimeoutMs,
                                         true);
      pipeline.addLast(READ_TIMEOUT_HANDLER_NAME, readTimeoutHandler);

      pipeline.addLast("codec", new HttpClientCodec());
      pipeline.addLast("http logger", new HttpRequestLoggingHandler());

      // Remove the following line if you don't want automatic content decompression.
      pipeline.addLast("inflater", new HttpContentDecompressor());
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpClientCodec

  private ChannelPipeline createPipeline() throws Exception
  {
    ChannelPipeline clientPipeline = pipeline();

    clientPipeline.addLast("client logger 1", new LoggingHandler("client logger 1", InternalLogLevel.DEBUG, true));
    clientPipeline.addLast("codec", new HttpClientCodec());
    clientPipeline.addLast("aggregator", new FooterAwareHttpChunkAggregator(1000000));
    _responseHandler = new SimpleHttpResponseHandler();
    clientPipeline.addLast("handler", _responseHandler);
    clientPipeline.addLast("client logger 5", new LoggingHandler("client logger 5", InternalLogLevel.DEBUG, true));
    return clientPipeline;
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.HttpClientCodec

            sslHandler.setCloseOnSSLException(true);
            LOG.debug("Client SSL handler configured and added as an interceptor against the ChannelPipeline: {}", sslHandler);
            pipeline.addLast("ssl", sslHandler);
        }
       
        pipeline.addLast("http", new HttpClientCodec());
       
        List<ChannelHandler> decoders = producer.getConfiguration().getDecoders();
        for (int x = 0; x < decoders.size(); x++) {
            ChannelHandler decoder = decoders.get(x);
            if (decoder instanceof ChannelHandlerFactory) {
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.