Package org.apache.http.impl

Examples of org.apache.http.impl.DefaultConnectionReuseStrategy


                this.client.getIoReactor(),
                new BasicNIOConnFactory(createClientConnectionFactory(this.clientParams)),
                this.clientParams);
        this.executor = new HttpAsyncRequestExecutor(
                this.clientHttpProc,
                new DefaultConnectionReuseStrategy(),
                this.clientParams);
    }
View Full Code Here


        // don't keep alive the HTTP connection and thus don't reuse the TCP socket
        if (keepAlive == 0) {
            client.setConnectionReuseStrategy(new NoConnectionReuseStrategy());
        } else {
            client.setConnectionReuseStrategy(new DefaultConnectionReuseStrategy());
            // either keep alive based on response header Keep-Alive,
            // or if the server can keep a persistent connection (-1), then override based on client's configuration
            client.setKeepAliveStrategy(new DefaultConnectionKeepAliveStrategy() {
                @Override
                public long getKeepAliveDuration(HttpResponse response, HttpContext context) {
View Full Code Here

    protected HttpRequestExecutor createRequestExecutor() {
        return new HttpRequestExecutor();
    }

    protected ConnectionReuseStrategy createConnectionReuseStrategy() {
        return new DefaultConnectionReuseStrategy();
    }
View Full Code Here

  }

  @Override
  protected ConnectionReuseStrategy createConnectionReuseStrategy()
  {
    return new DefaultConnectionReuseStrategy();
  }
View Full Code Here

       
        super();
        this.cfgCtx = cfgCtx;
        this.params = params;
        this.httpProcessor = getHttpProcessor();
        this.connStrategy = new DefaultConnectionReuseStrategy();
        this.metrics = metrics;
        this.allocator = new HeapByteBufferAllocator();
        this.threadingView = new ThreadingView("HttpClientWorker", true, 50);

        this.cfg = NHttpConfiguration.getInstance();
View Full Code Here

        this.params = listenerContext.getParams();
        this.isHttps = listenerContext.isSsl();
        this.metrics = listenerContext.getMetrics();
        this.responseFactory = new DefaultHttpResponseFactory();
        this.httpProcessor = getHttpProcessor();
        this.connStrategy = new DefaultConnectionReuseStrategy();
        this.allocator = new HeapByteBufferAllocator();
        this.activeConnections = new ArrayList<NHttpServerConnection>();
        this.latencyView = new LatencyView("NHTTPLatencyView", isHttps);
        this.s2sLatencyView = new LatencyView("NHTTPS2SLatencyView", isHttps);
        this.threadingView = new ThreadingView("HttpServerWorker", true, 50);
View Full Code Here

    }

   
    @Override
    protected ConnectionReuseStrategy createConnectionReuseStrategy() {
        return new DefaultConnectionReuseStrategy();
    }
View Full Code Here

                          "LocalTestServer/1.1");
        return params;
    }
   
    protected ConnectionReuseStrategy newConnectionReuseStrategy() {
        return new DefaultConnectionReuseStrategy();
    }
View Full Code Here

            // Set up request handlers
            HttpRequestHandlerRegistry reqistry = new HttpRequestHandlerRegistry();
            reqistry.register("/clusterservice", requestHandler);

            // Set up the HTTP service
            _httpService = new HttpService(httpproc, new DefaultConnectionReuseStrategy(), new DefaultHttpResponseFactory());
            _httpService.setParams(_params);
            _httpService.setHandlerResolver(reqistry);
        }
View Full Code Here


        _handler = new AsyncNHttpServiceHandler(
                httpproc,
                new DefaultHttpResponseFactory(),
                new DefaultConnectionReuseStrategy(),
                _params);

        // Set up request handlers
        final NHttpRequestHandlerResolver reqistry = HandlerUtils.initNRegistry(listener);
View Full Code Here

TOP

Related Classes of org.apache.http.impl.DefaultConnectionReuseStrategy

Copyright © 2018 www.massapicom. 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.