Class HttpClientUtils


  • public class HttpClientUtils
    extends java.lang.Object
    • Constructor Detail

      • HttpClientUtils

        public HttpClientUtils()
    • Method Detail

      • getSslStrategy

        public static org.apache.http.nio.conn.ssl.SSLIOSessionStrategy getSslStrategy​(SSLFactory sslFactory)
      • getMinimalHttpClient

        public static org.apache.http.impl.nio.client.CloseableHttpAsyncClient getMinimalHttpClient​(int ioThreadNum,
                                                                                                    int maxConnPerRoute,
                                                                                                    int maxConnTotal,
                                                                                                    int socketTimeout,
                                                                                                    int connectionTimeout,
                                                                                                    java.util.Optional<SSLFactory> sslFactory,
                                                                                                    java.util.Optional<CachedDnsResolver> dnsResolver,
                                                                                                    java.util.Optional<HttpConnectionPoolStats> poolStats)
      • getMinimalHttpClient

        public static org.apache.http.impl.nio.client.CloseableHttpAsyncClient getMinimalHttpClient​(int ioThreadNum,
                                                                                                    int maxConnPerRoute,
                                                                                                    int maxConnTotal,
                                                                                                    int socketTimeout,
                                                                                                    int connectionTimeout,
                                                                                                    java.util.Optional<SSLFactory> sslFactory,
                                                                                                    java.util.Optional<CachedDnsResolver> dnsResolver,
                                                                                                    java.util.Optional<HttpConnectionPoolStats> poolStats,
                                                                                                    boolean isIdleConnectionToServerCleanupEnabled,
                                                                                                    long idleConnectionCleanupThresholdMins)
      • createConnectionManager

        public static org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager createConnectionManager​(int ioThreadNum,
                                                                                                                int perRoute,
                                                                                                                int total,
                                                                                                                int soTimeout,
                                                                                                                int connectionTimeout,
                                                                                                                java.util.Optional<SSLFactory> sslFactory,
                                                                                                                java.util.Optional<CachedDnsResolver> dnsResolver,
                                                                                                                java.util.Optional<HttpConnectionPoolStats> poolStats)
      • getMinimalHttpClient

        public static org.apache.http.impl.nio.client.CloseableHttpAsyncClient getMinimalHttpClient​(int maxConnPerRoute,
                                                                                                    int maxConnTotal,
                                                                                                    java.util.Optional<SSLFactory> sslFactory)
        This function is only being used in test cases.
        Parameters:
        maxConnPerRoute -
        maxConnTotal -
        sslFactory -
        Returns: