public interface HttpClientCache
HttpClientAccessor
.Modifier and Type | Method and Description |
---|---|
io.vavr.control.Try<org.apache.http.client.HttpClient> |
tryGetHttpClient(HttpClientFactory httpClientFactory)
Gets the non-destination-specific
HttpClient from this cache. |
io.vavr.control.Try<org.apache.http.client.HttpClient> |
tryGetHttpClient(HttpDestinationProperties destination,
HttpClientFactory httpClientFactory)
Gets the
HttpClient for the given Destination from this cache. |
@Nonnull io.vavr.control.Try<org.apache.http.client.HttpClient> tryGetHttpClient(@Nonnull HttpDestinationProperties destination, @Nonnull HttpClientFactory httpClientFactory)
HttpClient
for the given Destination
from this cache.
If there is no HttpClient
for destination
it is created by using the HttpClientFactory
.
destination
- The Destination
to get the HttpClient
for.httpClientFactory
- The HttpClientFactory
used to create a new HttpClient
if no cached one can be found.HttpClient
for the given Destination
.HttpClientInstantiationException
- If there is an issue while retrieving the HttpClient
.@Nonnull io.vavr.control.Try<org.apache.http.client.HttpClient> tryGetHttpClient(@Nonnull HttpClientFactory httpClientFactory)
HttpClient
from this cache.
If there is no generic HttpClient
it is created by using the HttpClientFactory
.
httpClientFactory
- The HttpClientFactory
used to create a new HttpClient
if no cached one can be found.HttpClient
.Copyright © 2020 SAP SE. All rights reserved.