Class DefaultEurekaClientHttpRequestFactorySupplier
java.lang.Object
org.springframework.cloud.netflix.eureka.http.DefaultEurekaClientHttpRequestFactorySupplier
- All Implemented Interfaces:
EurekaClientHttpRequestFactorySupplier
public class DefaultEurekaClientHttpRequestFactorySupplier
extends Object
implements EurekaClientHttpRequestFactorySupplier
Supplier for the
ClientHttpRequestFactory to be used by Eureka client that uses
HttpClients.
This supplier is intentionally stateless: each call to get(javax.net.ssl.SSLContext, javax.net.ssl.HostnameVerifier) builds a fresh
CloseableHttpClient. Caching and lifecycle management of the shared client is
the responsibility of the owning TransportClientFactory
(RestClientTransportClientFactory), which is already created once per Eureka
client and is the natural owner of that client's lifecycle.
- Since:
- 3.0.0
- Author:
- Marcin Grzejszczak, Olga Maciaszek-Sharma, Jiwon Jeon
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.cloud.netflix.eureka.http.EurekaClientHttpRequestFactorySupplier
EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer -
Constructor Summary
ConstructorsConstructorDescriptionDefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties timeoutProperties, Set<EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer> requestConfigCustomizers) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpRequestFactoryget(SSLContext sslContext, HostnameVerifier hostnameVerifier) Returns a constructedClientHttpRequestFactory.
-
Constructor Details
-
DefaultEurekaClientHttpRequestFactorySupplier
public DefaultEurekaClientHttpRequestFactorySupplier(TimeoutProperties timeoutProperties, Set<EurekaClientHttpRequestFactorySupplier.RequestConfigCustomizer> requestConfigCustomizers)
-
-
Method Details
-
get
public org.springframework.http.client.ClientHttpRequestFactory get(SSLContext sslContext, @Nullable HostnameVerifier hostnameVerifier) Description copied from interface:EurekaClientHttpRequestFactorySupplierReturns a constructedClientHttpRequestFactory.- Specified by:
getin interfaceEurekaClientHttpRequestFactorySupplier- Parameters:
sslContext- SSL ContexthostnameVerifier- Hostname verifier- Returns:
ClientHttpRequestFactory
-