Package org.eclipse.sw360.http
Class HttpClientFactoryImpl
- java.lang.Object
-
- org.eclipse.sw360.http.HttpClientFactoryImpl
-
- All Implemented Interfaces:
HttpClientFactory
public class HttpClientFactoryImpl extends Object implements HttpClientFactory
An implementation of the
HttpClientFactoryinterface that creates client instances using underlying OkHttpClient objects.
-
-
Constructor Summary
Constructors Constructor Description HttpClientFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpClientnewHttpClient(HttpClientConfig config)Creates a new instance ofHttpClientand configures it according to the passed in configuration object.HttpClientnewHttpClientAlt(HttpClientConfig config)Creates a new instance ofHttpClientand configures it according to the passed in configuration object.
-
-
-
Method Detail
-
newHttpClient
public HttpClient newHttpClient(HttpClientConfig config)
Description copied from interface:HttpClientFactoryCreates a new instance ofHttpClientand configures it according to the passed in configuration object.- Specified by:
newHttpClientin interfaceHttpClientFactory- Parameters:
config- the configuration for the new client- Returns:
- the new
HttpClientinstance
-
newHttpClientAlt
public HttpClient newHttpClientAlt(HttpClientConfig config)
Description copied from interface:HttpClientFactoryCreates a new instance ofHttpClientand configures it according to the passed in configuration object.- Specified by:
newHttpClientAltin interfaceHttpClientFactory- Parameters:
config- the configuration for the new(native java) client- Returns:
- the new
HttpClientinstance
-
-