Package com.sap.cloud.security.client
Interface HttpClientFactory
- All Known Implementing Classes:
DefaultHttpClientFactory
public interface HttpClientFactory
Represents a
CloseableHttpClient creation interface.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.http.impl.client.CloseableHttpClientcreate(ClientIdentity clientIdentity) Don't close the HTTPClient when you've provided it toTokenAuthenticatororXsuaaTokenFlowsinstance.org.apache.http.impl.client.CloseableHttpClientcreateClient(ClientIdentity clientIdentity) Provides CloseableHttpClient based on ClientIdentity details.
-
Field Details
-
services
-
DEFAULT_HTTP_CLIENT_FACTORY
- See Also:
-
-
Method Details
-
createClient
org.apache.http.impl.client.CloseableHttpClient createClient(ClientIdentity clientIdentity) throws HttpClientException Provides 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.- 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
-
create
static org.apache.http.impl.client.CloseableHttpClient create(ClientIdentity clientIdentity) throws HttpClientException Don't close the HTTPClient when you've provided it toTokenAuthenticatororXsuaaTokenFlowsinstance.- Parameters:
clientIdentity- to identify the identity provider client.- Returns:
- HTTP or HTTPS client
- Throws:
HttpClientException
-