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
FieldsModifier and TypeFieldDescriptionprotected final List<HttpClientCustomizer> protected final HttpClientPropertiesprotected final org.springframework.boot.web.server.autoconfigure.ServerPropertiesprotected final HttpClientSslConfigurerFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientFactory(HttpClientProperties properties, org.springframework.boot.web.server.autoconfigure.ServerProperties serverProperties, List<HttpClientCustomizer> customizers) HttpClientFactory(HttpClientProperties properties, org.springframework.boot.web.server.autoconfigure.ServerProperties serverProperties, HttpClientSslConfigurer sslConfigurer, List<HttpClientCustomizer> customizers) -
Method Summary
Modifier and TypeMethodDescriptionprotected reactor.netty.resources.ConnectionProviderbuildConnectionProvider(HttpClientProperties properties) protected reactor.netty.http.client.HttpClientconfigureProxy(reactor.netty.http.client.HttpClient httpClient) protected reactor.netty.transport.ProxyProvider.BuilderconfigureProxyProvider(HttpClientProperties.Proxy proxy, reactor.netty.transport.ProxyProvider.TypeSpec proxySpec) protected reactor.netty.http.client.HttpClientconfigureSsl(reactor.netty.http.client.HttpClient httpClient) protected reactor.netty.http.client.HttpClientClass<?> protected reactor.netty.http.client.HttpResponseDecoderSpechttpResponseDecoder(reactor.netty.http.client.HttpResponseDecoderSpec spec) Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
properties
-
serverProperties
protected final org.springframework.boot.web.server.autoconfigure.ServerProperties serverProperties -
sslConfigurer
-
customizers
-
-
Constructor Details
-
HttpClientFactory
public HttpClientFactory(HttpClientProperties properties, org.springframework.boot.web.server.autoconfigure.ServerProperties serverProperties, List<HttpClientCustomizer> customizers) -
HttpClientFactory
public HttpClientFactory(HttpClientProperties properties, org.springframework.boot.web.server.autoconfigure.ServerProperties serverProperties, HttpClientSslConfigurer sslConfigurer, List<HttpClientCustomizer> customizers)
-
-
Method Details
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<reactor.netty.http.client.HttpClient>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<reactor.netty.http.client.HttpClient>
-
createInstance
protected reactor.netty.http.client.HttpClient createInstance()- Specified by:
createInstancein 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) -
configureProxy
protected reactor.netty.http.client.HttpClient configureProxy(reactor.netty.http.client.HttpClient httpClient) -
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)
-