Package org.apache.http.impl.client

Examples of org.apache.http.impl.client.HttpClientBuilder.build()


        .setDefaultCredentialsProvider(credentialsProvider);
      if (myFactory != null)
        builder.setSSLSocketFactory(myFactory);
      builder.setRequestExecutor(new HttpRequestExecutor(socketTimeout))
        .setRedirectStrategy(new DefaultRedirectStrategy());
      httpClient = builder.build();
     
      proxy = new SPSProxyHelper( serverUrl, encodedServerLocation, serverLocation, serverUserName, password,
        org.apache.manifoldcf.core.common.CommonsHTTPSender.class, "client-config.wsdd",
        httpClient, isClaimSpace );
     
View Full Code Here


        .setDefaultCredentialsProvider(credentialsProvider);
      if (myFactory != null)
        builder.setSSLSocketFactory(myFactory);
      builder.setRequestExecutor(new HttpRequestExecutor(socketTimeout))
        .setRedirectStrategy(new DefaultRedirectStrategy());
      httpClient = builder.build();

      proxy = new SPSProxyHelper( serverUrl, encodedServerLocation, serverLocation, userName, password,
        org.apache.manifoldcf.core.common.CommonsHTTPSender.class, "client-config.wsdd",
        httpClient );
     
View Full Code Here

//                    if (ceheader != null && contains(ceheader.getElements(), "gzip")) {
//                        response.setEntity(new GzipInflatingHttpEntityWrapper(response.getEntity()));
//                    }
//                }
//            });
            this.client = builder.build();
        }
        return client;
    }

    private long queryRangeSecs = 6L*30*24*3600;
 
View Full Code Here

        .setDefaultCredentialsProvider(credentialsProvider);
      if (myFactory != null)
        builder.setSSLSocketFactory(myFactory);
      builder.setRequestExecutor(new HttpRequestExecutor(socketTimeout))
        .setRedirectStrategy(new DefaultRedirectStrategy());
      httpClient = builder.build();

      proxy = new SPSProxyHelper( serverUrl, encodedServerLocation, serverLocation, userName, password,
        org.apache.manifoldcf.core.common.CommonsHTTPSender.class, "client-config.wsdd",
        httpClient );
     
View Full Code Here

        .setRedirectStrategy(new DefaultRedirectStrategy());

      if (myFactory != null)
        builder.setSSLSocketFactory(myFactory);
     
      httpClient = builder.build();

      // System.out.println("Connection server object = "+llServer.toString());

      // Establish the actual connection
      int sanityRetryCount = FAILURE_RETRY_COUNT;
View Full Code Here

            new UsernamePasswordCredentials(config.getProxyUserName(), config.getProxyPassword()));
        builder.setDefaultCredentialsProvider(credentialsProvider);
      }
    }

    return builder.build();
  }

  protected int getDefaultMaxPerRoute(GoogleAnalyticsConfig config) {
    return Math.max(config.getMaxThreads(), 1);
  }
View Full Code Here

            new UsernamePasswordCredentials(config.getProxyUserName(), config.getProxyPassword()));
        builder.setDefaultCredentialsProvider(credentialsProvider);
      }
    }

    return builder.build();
  }

  protected int getDefaultMaxPerRoute(GoogleAnalyticsConfig config) {
    return Math.max(config.getMaxThreads(), 1);
  }
View Full Code Here

   }

   private boolean validateLocalRepoURL(String localRepoURL) {
      boolean succ = true;
      HttpClientBuilder builder = HttpClientBuilder.create();
      CloseableHttpClient httpClient = builder.build();

      // test the connection to the given url
      try {
         HttpGet httpGet = new HttpGet(localRepoURL);
         HttpResponse resp = httpClient.execute(httpGet);
View Full Code Here

            HttpClientBuilder clientBuilder = HttpClients.custom();
            clientBuilder.setDefaultRequestConfig(requestBuilder.build());
            clientBuilder.setDefaultConnectionConfig(connBuilder.build());
            clientBuilder.setConnectionManager(hccm);

            client = clientBuilder.build();
        }

        return client;
    }
View Full Code Here

            clientBuilder.setDefaultCredentialsProvider(credentialsProvider);
            context.setAttribute("preemptive-auth", new BasicScheme());
            clientBuilder.addInterceptorFirst(new PreemptiveAuth());
        }
       
        return clientBuilder.build();
    }
   
    private KeyStore loadKeyStore(String keyStorePath, String password) throws Exception {
        FileInputStream keyStoreInput = null;
        try {
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.