Package com.linkedin.venice.httpclient
Class HttpClientUtils
- java.lang.Object
-
- com.linkedin.venice.httpclient.HttpClientUtils
-
public class HttpClientUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpClientUtils.ClosableHttpAsyncClientWithConnManager
-
Constructor Summary
Constructors Constructor Description HttpClientUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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)
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)
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)
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.static HttpClientUtils.ClosableHttpAsyncClientWithConnManager
getMinimalHttpClientWithConnManager(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)
static org.apache.http.nio.conn.ssl.SSLIOSessionStrategy
getSslStrategy(SSLFactory sslFactory)
-
-
-
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)
-
getMinimalHttpClientWithConnManager
public static HttpClientUtils.ClosableHttpAsyncClientWithConnManager getMinimalHttpClientWithConnManager(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)
-
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:
-
-