Package com.softlayer.api.http
Class HttpClientFactory
java.lang.Object
com.softlayer.api.http.HttpClientFactory
- Direct Known Subclasses:
ThreadPooledHttpClientFactory
public abstract class HttpClientFactory extends Object
Base class for an HTTP client factory. By default the
BuiltInHttpClientFactory
is used. This
can be overridden by a custom client factory using the ServiceLoader
pattern. It is also
cached (though not necessarily guaranteed to be a singleton or instantiated only once) upon first access.-
Constructor Summary
Constructors Constructor Description HttpClientFactory()
-
Method Summary
Modifier and Type Method Description static HttpClientFactory
getDefault()
abstract HttpClient
getHttpClient(HttpCredentials credentials, String method, String fullUrl, Map<String,List<String>> headers)
Get the HTTP client for the given request information.
-
Constructor Details
-
HttpClientFactory
public HttpClientFactory()
-
-
Method Details
-
getDefault
-
getHttpClient
public abstract HttpClient getHttpClient(HttpCredentials credentials, String method, String fullUrl, Map<String,List<String>> headers)Get the HTTP client for the given request information. The resulting client is only used once.
-