public class HttpUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpUtil.HttpInputStream |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT |
static int |
DEFAULT_HTTP_CLIENT_SOCKET_TIMEOUT |
static int |
DEFAULT_MAX_CONNECTIONS |
static int |
DEFAULT_MAX_CONNECTIONS_PER_ROUTE |
Constructor and Description |
---|
HttpUtil() |
Modifier and Type | Method and Description |
---|---|
static org.apache.http.client.HttpClient |
buildHttpClient()
Build an Http client using our set of default.
|
static org.apache.http.client.config.RequestConfig |
getDefaultRequestConfigWithSocketTimeout(int soTimeoutMs)
Return a request configuration inheriting from the default request
configuration of the shared HttpClient with a different socket timeout.
|
static org.apache.http.client.HttpClient |
getHttpClient()
Accessor for the HTTP client singleton.
|
static String |
getHttpClientStats()
Accessor for the HTTP client singleton.
|
public static final int DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE
public static final int DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_HTTP_CLIENT_SOCKET_TIMEOUT
public static final org.apache.http.client.HttpClient buildHttpClient()
public static org.apache.http.client.HttpClient getHttpClient()
public static final org.apache.http.client.config.RequestConfig getDefaultRequestConfigWithSocketTimeout(int soTimeoutMs)
soTimeoutMs
- - custom socket timeout in milli-secondspublic static String getHttpClientStats()
Copyright © 2017. All rights reserved.