类 HttpComponentsClientHttpRequestFactoryBuilder
java.lang.Object
org.springframework.boot.http.client.HttpComponentsClientHttpRequestFactoryBuilder
Builder for
ClientHttpRequestFactoryBuilder.httpComponents().- 从以下版本开始:
- 3.4.0
- 作者:
- Phillip Webb, Andy Wilkinson, Scott Frederick
-
方法概要
修饰符和类型方法说明protected final HttpClientSettingsbuild(ClientHttpRequestFactorySettings settings) Build a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.protected HttpComponentsClientHttpRequestFactoryprotected final List<Consumer<HttpComponentsClientHttpRequestFactory>> protected final List<Consumer<HttpComponentsClientHttpRequestFactory>> protected final List<Consumer<HttpComponentsClientHttpRequestFactory>> withConnectionManagerCustomizer(Consumer<org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder> connectionManagerCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingPoolingHttpClientConnectionManagerBuilder.withCustomizer(Consumer<HttpComponentsClientHttpRequestFactory> customizer) Return a newClientHttpRequestFactoryBuilderthat applies the given customizer to theClientHttpRequestFactoryafter it has been built.withCustomizers(Collection<Consumer<HttpComponentsClientHttpRequestFactory>> customizers) Return a newClientHttpRequestFactoryBuilderthat applies the given customizers to theClientHttpRequestFactoryafter it has been built.withDefaultRequestConfigCustomizer(Consumer<org.apache.hc.client5.http.config.RequestConfig.Builder> defaultRequestConfigCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingRequestConfig.Builderused for default requests.withHttpClientCustomizer(Consumer<org.apache.hc.client5.http.impl.classic.HttpClientBuilder> httpClientCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClientBuilder.withSocketConfigCustomizer(Consumer<org.apache.hc.core5.http.io.SocketConfig.Builder> socketConfigCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingSocketConfig.Builder.withTlsSocketStrategyFactory(Function<SslBundle, org.apache.hc.client5.http.ssl.TlsSocketStrategy> tlsSocketStrategyFactory) Return a newHttpComponentsClientHttpRequestFactoryBuilderwith a replacementTlsSocketStrategyfactory.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder
build
-
方法详细资料
-
withCustomizer
public HttpComponentsClientHttpRequestFactoryBuilder withCustomizer(Consumer<HttpComponentsClientHttpRequestFactory> customizer) 从接口复制的说明:ClientHttpRequestFactoryBuilderReturn a newClientHttpRequestFactoryBuilderthat applies the given customizer to theClientHttpRequestFactoryafter it has been built.- 参数:
customizer- the customizers to apply- 返回:
- a new
ClientHttpRequestFactoryBuilderinstance
-
withCustomizers
public HttpComponentsClientHttpRequestFactoryBuilder withCustomizers(Collection<Consumer<HttpComponentsClientHttpRequestFactory>> customizers) 从接口复制的说明:ClientHttpRequestFactoryBuilderReturn a newClientHttpRequestFactoryBuilderthat applies the given customizers to theClientHttpRequestFactoryafter it has been built.- 参数:
customizers- the customizers to apply- 返回:
- a new
ClientHttpRequestFactoryBuilderinstance
-
withHttpClientCustomizer
public HttpComponentsClientHttpRequestFactoryBuilder withHttpClientCustomizer(Consumer<org.apache.hc.client5.http.impl.classic.HttpClientBuilder> httpClientCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClientBuilder.- 参数:
httpClientCustomizer- the customizer to apply- 返回:
- a new
HttpComponentsClientHttpRequestFactoryBuilderinstance
-
withConnectionManagerCustomizer
public HttpComponentsClientHttpRequestFactoryBuilder withConnectionManagerCustomizer(Consumer<org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder> connectionManagerCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingPoolingHttpClientConnectionManagerBuilder.- 参数:
connectionManagerCustomizer- the customizer to apply- 返回:
- a new
HttpComponentsClientHttpRequestFactoryBuilderinstance
-
withSocketConfigCustomizer
public HttpComponentsClientHttpRequestFactoryBuilder withSocketConfigCustomizer(Consumer<org.apache.hc.core5.http.io.SocketConfig.Builder> socketConfigCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingSocketConfig.Builder.- 参数:
socketConfigCustomizer- the customizer to apply- 返回:
- a new
HttpComponentsClientHttpRequestFactoryBuilderinstance
-
withTlsSocketStrategyFactory
public HttpComponentsClientHttpRequestFactoryBuilder withTlsSocketStrategyFactory(Function<SslBundle, org.apache.hc.client5.http.ssl.TlsSocketStrategy> tlsSocketStrategyFactory) Return a newHttpComponentsClientHttpRequestFactoryBuilderwith a replacementTlsSocketStrategyfactory.- 参数:
tlsSocketStrategyFactory- the new factory used to create aTlsSocketStrategyfor a givenSslBundle- 返回:
- a new
HttpComponentsClientHttpRequestFactoryBuilderinstance
-
withDefaultRequestConfigCustomizer
public HttpComponentsClientHttpRequestFactoryBuilder withDefaultRequestConfigCustomizer(Consumer<org.apache.hc.client5.http.config.RequestConfig.Builder> defaultRequestConfigCustomizer) Return a newHttpComponentsClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingRequestConfig.Builderused for default requests.- 参数:
defaultRequestConfigCustomizer- the customizer to apply- 返回:
- a new
HttpComponentsClientHttpRequestFactoryBuilderinstance
-
createClientHttpRequestFactory
protected HttpComponentsClientHttpRequestFactory createClientHttpRequestFactory(ClientHttpRequestFactorySettings settings) -
getCustomizers
-
mergedCustomizers
protected final List<Consumer<HttpComponentsClientHttpRequestFactory>> mergedCustomizers(Consumer<HttpComponentsClientHttpRequestFactory> customizer) -
mergedCustomizers
protected final List<Consumer<HttpComponentsClientHttpRequestFactory>> mergedCustomizers(Collection<Consumer<HttpComponentsClientHttpRequestFactory>> customizers) -
build
public final HttpComponentsClientHttpRequestFactory build(ClientHttpRequestFactorySettings settings) 从接口复制的说明:ClientHttpRequestFactoryBuilderBuild a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.- 指定者:
build在接口中ClientHttpRequestFactoryBuilder<T extends ClientHttpRequestFactory>- 参数:
settings- the settings to apply ornull- 返回:
- a fully configured
ClientHttpRequestFactory.
-
asHttpClientSettings
-