Examples of PoolingClientConnectionManager


Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

      }

      // Set up ssl if indicated
      keystoreData = params.getParameter( "keystore" );

      PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
      localConnectionManager.setMaxTotal(1);
      connectionManager = localConnectionManager;

      if (keystoreData != null)
      {
        keystoreManager = KeystoreManagerFactory.make("",keystoreData);
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

    {
      int socketTimeout = 900000;
      int connectionTimeout = 300000;

      // Set up connection manager
      PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
      localConnectionManager.setMaxTotal(1);

      // Set up ingest ssl if indicated
      if (ingestKeystoreManager != null)
      {
        SSLSocketFactory myFactory = new SSLSocketFactory(new InterruptibleSocketFactory(ingestKeystoreManager.getSecureSocketFactory(), connectionTimeout),
          new BrowserCompatHostnameVerifier());
        Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);
        localConnectionManager.getSchemeRegistry().register(myHttpsProtocol);
      }
      connectionManager = localConnectionManager;

      // Create the httpclient
      BasicHttpParams params = new BasicHttpParams();
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

      SSLSocketFactory myFactory = new SSLSocketFactory(new InterruptibleSocketFactory(httpsSocketFactory,connectionTimeout),
        new AllowAllHostnameVerifier());
      Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);

      // Set up connection manager
      PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
      localConnectionManager.setMaxTotal(1);
      connectionManager = localConnectionManager;
      // Set up protocol registry
      connectionManager.getSchemeRegistry().register(myHttpsProtocol);

      BasicHttpParams params = new BasicHttpParams();
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

    javax.net.ssl.SSLSocketFactory httpsSocketFactory = KeystoreManagerFactory.getTrustingSecureSocketFactory();
    SSLSocketFactory myFactory = new SSLSocketFactory(new InterruptibleSocketFactory(httpsSocketFactory,connectionTimeout),
      new AllowAllHostnameVerifier());
    Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);

    PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
    localConnectionManager.setMaxTotal(1);
    connectionManager = localConnectionManager;
    // Set up protocol registry
    connectionManager.getSchemeRegistry().register(myHttpsProtocol);

    BasicHttpParams params = new BasicHttpParams();
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

      SSLSocketFactory myFactory = new SSLSocketFactory(new InterruptibleSocketFactory(httpsSocketFactory,connectionTimeout),
        new AllowAllHostnameVerifier());
      Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);

      // Set up connection manager
      PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
      localConnectionManager.setMaxTotal(1);
      connectionManager = localConnectionManager;
      // Set up protocol registry
      connectionManager.getSchemeRegistry().register(myHttpsProtocol);

      BasicHttpParams params = new BasicHttpParams();
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

    {
      int socketTimeout = 900000;
      int connectionTimeout = 300000;

      // Set up connection manager
      PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
      localConnectionManager.setMaxTotal(1);

      // Set up ingest ssl if indicated
      if (ingestKeystoreManager != null)
      {
        SSLSocketFactory myFactory = new SSLSocketFactory(new InterruptibleSocketFactory(ingestKeystoreManager.getSecureSocketFactory(), connectionTimeout),
          new BrowserCompatHostnameVerifier());
        Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);
        localConnectionManager.getSchemeRegistry().register(myHttpsProtocol);
      }
      connectionManager = localConnectionManager;

      // Create the httpclient
      BasicHttpParams params = new BasicHttpParams();
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

             * See SystemDefaultHttpClient (4.2). This version always sets the
             * connection cache
             */
            @Override
            protected ClientConnectionManager createClientConnectionManager() {
                PoolingClientConnectionManager connmgr = new PoolingClientConnectionManager(
                        SchemeRegistryFactory.createSystemDefault());
                String s = System.getProperty("http.maxConnections", "5");
                int max = Integer.parseInt(s);
                connmgr.setDefaultMaxPerRoute(max);
                connmgr.setMaxTotal(2 * max);
                return connmgr;
            }
        };
    }
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

      location += "/" + core;
    }

    // Initialize standard solr-j.
    // First, we need an HttpClient where basic auth is properly set up.
    PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
    localConnectionManager.setMaxTotal(1);
    SSLSocketFactory myFactory;
    if (keystoreManager != null)
    {
      myFactory = new SSLSocketFactory(keystoreManager.getSecureSocketFactory(),
        new AllowAllHostnameVerifier());
    }
    else
    {
      // Use the "trust everything" one
      myFactory = new SSLSocketFactory(KeystoreManagerFactory.getTrustingSecureSocketFactory(),
        new AllowAllHostnameVerifier());
    }
    Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);
    localConnectionManager.getSchemeRegistry().register(myHttpsProtocol);
    connectionManager = localConnectionManager;
         
    BasicHttpParams params = new BasicHttpParams();
    // This one is essential to prevent us from reading from the content stream before necessary during auth, but
    // is incompatible with some proxies.
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

        // Each ASConnection instance will have its own HttpClient instance. Setup begins here

        SchemeRegistry schemeRegistry = new SchemeRegistryBuilder(asConnectionParams).buildSchemeRegistry();

        // HttpClient will use a pooling connection manager to allow concurrent request processing
        PoolingClientConnectionManager httpConnectionManager = new PoolingClientConnectionManager(schemeRegistry);
        httpConnectionManager.setDefaultMaxPerRoute(MAX_POOLED_CONNECTIONS);
        httpConnectionManager.setMaxTotal(MAX_POOLED_CONNECTIONS);

        httpClient = new DefaultHttpClient(httpConnectionManager);
        HttpParams httpParams = httpClient.getParams();

        // Disable stale connection checking on connection lease to get better performance
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager

      SSLSocketFactory myFactory = new SSLSocketFactory(new InterruptibleSocketFactory(httpsSocketFactory,connectionTimeout),
        new AllowAllHostnameVerifier());
      Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);

      // Set up connection manager
      PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
      localConnectionManager.setMaxTotal(1);
      connectionManager = localConnectionManager;
      // Set up protocol registry
      connectionManager.getSchemeRegistry().register(myHttpsProtocol);

      BasicHttpParams params = new BasicHttpParams();
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.