public abstract class AbstractHttpClientFactory extends Object implements HttpClientFactory
HttpClientFactory.| Constructor and Description |
|---|
AbstractHttpClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.client.HttpClient |
createHttpClient(HttpDestinationProperties destination)
Creates an
HttpClient based on the given HttpDestinationProperties. |
protected org.apache.http.impl.conn.PoolingHttpClientConnectionManager |
getConnectionManager(HttpDestinationProperties destination)
Get the connection manager for the HTTP client builder.
|
protected org.apache.http.impl.client.HttpClientBuilder |
getHttpClientBuilder(HttpDestinationProperties destination)
Get a preconfigured HTTP client builder instance.
|
protected org.apache.http.client.config.RequestConfig.Builder |
getRequestConfigBuilder(HttpDestinationProperties destination)
Get the request configuration builder for the HTTP client builder.
|
protected org.apache.http.config.SocketConfig.Builder |
getSocketConfigBuilder(HttpDestinationProperties destination)
Get the socket configuration builder for the HTTP client builder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateHttpClient@Nonnull public org.apache.http.client.HttpClient createHttpClient(@Nullable HttpDestinationProperties destination) throws DestinationAccessException, HttpClientInstantiationException
HttpClientFactoryHttpClient based on the given HttpDestinationProperties.
Caution: Implementations must ensure that this method is thread-safe.
createHttpClient in interface HttpClientFactorydestination - The destination to create the HttpClient for.HttpClient based on the given Destination.DestinationAccessException - if the type of the destination is not HTTP.HttpClientInstantiationException - if there occurred an error during the creation of the client.@Nonnull protected org.apache.http.client.config.RequestConfig.Builder getRequestConfigBuilder(@Nullable HttpDestinationProperties destination)
destination - The optional destination reference.@Nonnull protected org.apache.http.config.SocketConfig.Builder getSocketConfigBuilder(@Nullable HttpDestinationProperties destination)
destination - The optional destination reference.protected org.apache.http.impl.client.HttpClientBuilder getHttpClientBuilder(@Nullable HttpDestinationProperties destination) throws HttpClientInstantiationException
destination - The optional destination reference to create a client builder for.HttpClientInstantiationException - if there occurred an error during the configuration of the client builder.@Nonnull protected org.apache.http.impl.conn.PoolingHttpClientConnectionManager getConnectionManager(@Nullable HttpDestinationProperties destination) throws GeneralSecurityException, IOException
destination - The optional destination reference.IOException - If trust store or key store could not be loaded.GeneralSecurityException - If trust store or key store could not be loaded.Copyright © 2021 SAP SE. All rights reserved.