Class HttpClientProvider
java.lang.Object
se.liu.ida.hefquin.base.shared.http.HttpClientProvider
Provides shared
HttpClient instances.
Each HttpClient instance manages its own internal connection pool.
A single client handles requests to many different hosts while reusing
connections where possible.
The connectTimeout is a client-level configuration and cannot be
changed after a client is created. To support different connection-timeout
requirements, the provider returns a different HttpClient instance
for each timeout value. Each such client then manages its own independent set
of pooled connections for all routes it is used with.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<Long, HttpClient> protected static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientclient()static HttpClientclient(long connectTimeout)
-
Field Details
-
NO_TIMEOUT
protected static final long NO_TIMEOUT- See Also:
-
BY_CONNECT_TIMEOUT
-
-
Constructor Details
-
HttpClientProvider
public HttpClientProvider()
-
-
Method Details
-
client
-
client
-