Package com.sap.cloud.security.client
Class DefaultHttpClientFactory
- java.lang.Object
-
- com.sap.cloud.security.client.DefaultHttpClientFactory
-
- All Implemented Interfaces:
HttpClientFactory
public class DefaultHttpClientFactory extends Object implements HttpClientFactory
Creates aCloseableHttpClientinstance. Supports certificate based communication.
-
-
Field Summary
-
Fields inherited from interface com.sap.cloud.security.client.HttpClientFactory
DEFAULT_HTTP_CLIENT_FACTORY, services
-
-
Constructor Summary
Constructors Constructor Description DefaultHttpClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.impl.client.CloseableHttpClientcreateClient(ClientIdentity clientIdentity)Provides CloseableHttpClient based on ClientIdentity details.
-
-
-
Method Detail
-
createClient
public org.apache.http.impl.client.CloseableHttpClient createClient(ClientIdentity clientIdentity) throws HttpClientException
Description copied from interface:HttpClientFactoryProvides CloseableHttpClient based on ClientIdentity details. For ClientIdentity that is certificate based it will resolve https client using the provided ClientIdentity, if the ClientIdentity wasn't provided it will return default HttpClient.- Specified by:
createClientin interfaceHttpClientFactory- Parameters:
clientIdentity- for X.509 certificate based communicationClientCertificateimplementation of ClientIdentity interface should be provided- Returns:
- HTTP or HTTPS client
- Throws:
HttpClientException- in case HTTPS Client could not be setup
-
-