Class HttpClientFactory
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean<reactor.netty.http.client.HttpClient>
-
- org.springframework.cloud.gateway.config.HttpClientFactory
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<reactor.netty.http.client.HttpClient>
,org.springframework.beans.factory.InitializingBean
public class HttpClientFactory extends org.springframework.beans.factory.config.AbstractFactoryBean<reactor.netty.http.client.HttpClient>
Factory Bean that allows users to extend and customize parts of the HttpClient. Also allows for testing the configuration of the HttpClient.- Since:
- 3.1.1
- Author:
- Spencer Gibb
-
-
Field Summary
Fields Modifier and Type Field Description protected List<HttpClientCustomizer>
customizers
protected HttpClientProperties
properties
protected org.springframework.boot.autoconfigure.web.ServerProperties
serverProperties
protected HttpClientSslConfigurer
sslConfigurer
-
Constructor Summary
Constructors Constructor Description HttpClientFactory(HttpClientProperties properties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, List<HttpClientCustomizer> customizers)
HttpClientFactory(HttpClientProperties properties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, HttpClientSslConfigurer sslConfigurer, List<HttpClientCustomizer> customizers)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected reactor.netty.resources.ConnectionProvider
buildConnectionProvider(HttpClientProperties properties)
protected reactor.netty.http.client.HttpClient
configureProxy(reactor.netty.http.client.HttpClient httpClient)
protected reactor.netty.transport.ProxyProvider.Builder
configureProxyProvider(HttpClientProperties.Proxy proxy, reactor.netty.transport.ProxyProvider.TypeSpec proxySpec)
protected reactor.netty.http.client.HttpClient
configureSsl(reactor.netty.http.client.HttpClient httpClient)
protected void
configureSslContext(HttpClientProperties.Ssl ssl, reactor.netty.tcp.SslProvider.SslContextSpec sslContextSpec)
Deprecated.protected reactor.netty.http.client.HttpClient
createInstance()
protected KeyStore
createKeyStore()
Deprecated.protected KeyManagerFactory
getKeyManagerFactory()
Deprecated.Class<?>
getObjectType()
protected X509Certificate[]
getTrustedX509CertificatesForTrustManager()
Deprecated.protected reactor.netty.http.client.HttpResponseDecoderSpec
httpResponseDecoder(reactor.netty.http.client.HttpResponseDecoderSpec spec)
protected void
setTrustManager(io.netty.handler.ssl.SslContextBuilder sslContextBuilder, X509Certificate... trustedX509Certificates)
Deprecated.protected void
setTrustManager(io.netty.handler.ssl.SslContextBuilder sslContextBuilder, TrustManagerFactory factory)
Deprecated.
-
-
-
Field Detail
-
properties
protected final HttpClientProperties properties
-
serverProperties
protected final org.springframework.boot.autoconfigure.web.ServerProperties serverProperties
-
sslConfigurer
protected final HttpClientSslConfigurer sslConfigurer
-
customizers
protected final List<HttpClientCustomizer> customizers
-
-
Constructor Detail
-
HttpClientFactory
public HttpClientFactory(HttpClientProperties properties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, List<HttpClientCustomizer> customizers)
-
HttpClientFactory
public HttpClientFactory(HttpClientProperties properties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, HttpClientSslConfigurer sslConfigurer, List<HttpClientCustomizer> customizers)
-
-
Method Detail
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<reactor.netty.http.client.HttpClient>
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean<reactor.netty.http.client.HttpClient>
-
createInstance
protected reactor.netty.http.client.HttpClient createInstance()
- Specified by:
createInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean<reactor.netty.http.client.HttpClient>
-
configureSsl
protected reactor.netty.http.client.HttpClient configureSsl(reactor.netty.http.client.HttpClient httpClient)
-
configureSslContext
@Deprecated protected void configureSslContext(HttpClientProperties.Ssl ssl, reactor.netty.tcp.SslProvider.SslContextSpec sslContextSpec)
Deprecated.
-
configureProxy
protected reactor.netty.http.client.HttpClient configureProxy(reactor.netty.http.client.HttpClient httpClient)
-
getTrustedX509CertificatesForTrustManager
@Deprecated protected X509Certificate[] getTrustedX509CertificatesForTrustManager()
Deprecated.
-
getKeyManagerFactory
@Deprecated protected KeyManagerFactory getKeyManagerFactory()
Deprecated.
-
createKeyStore
@Deprecated protected KeyStore createKeyStore()
Deprecated.
-
setTrustManager
@Deprecated protected void setTrustManager(io.netty.handler.ssl.SslContextBuilder sslContextBuilder, X509Certificate... trustedX509Certificates)
Deprecated.
-
setTrustManager
@Deprecated protected void setTrustManager(io.netty.handler.ssl.SslContextBuilder sslContextBuilder, TrustManagerFactory factory)
Deprecated.
-
configureProxyProvider
protected reactor.netty.transport.ProxyProvider.Builder configureProxyProvider(HttpClientProperties.Proxy proxy, reactor.netty.transport.ProxyProvider.TypeSpec proxySpec)
-
httpResponseDecoder
protected reactor.netty.http.client.HttpResponseDecoderSpec httpResponseDecoder(reactor.netty.http.client.HttpResponseDecoderSpec spec)
-
buildConnectionProvider
protected reactor.netty.resources.ConnectionProvider buildConnectionProvider(HttpClientProperties properties)
-
-