Class HttpComponentsHttpAsyncClientBuilder
java.lang.Object
org.springframework.boot.http.client.HttpComponentsHttpAsyncClientBuilder
Builder that can be used to create a
 Apache HttpComponents
 
HttpAsyncClient.- Since:
- 3.5.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.hc.client5.http.impl.async.CloseableHttpAsyncClientbuild(HttpClientSettings settings) Build a newHttpAsyncClientinstance with the given settings applied.withConnectionConfigCustomizer(Consumer<org.apache.hc.client5.http.config.ConnectionConfig.Builder> connectionConfigCustomizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingConnectionConfig.Builder.withConnectionManagerCustomizer(Consumer<org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder> connectionManagerCustomizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingPoolingAsyncClientConnectionManagerBuilder.withCustomizer(Consumer<org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder> customizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingHttpAsyncClientBuilder.withDefaultRequestConfigCustomizer(Consumer<org.apache.hc.client5.http.config.RequestConfig.Builder> defaultRequestConfigCustomizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingRequestConfig.Builderused for default requests.withTlsStrategyFactory(Function<SslBundle, org.apache.hc.core5.http.nio.ssl.TlsStrategy> tlsStrategyFactory) Return a newHttpComponentsHttpAsyncClientBuilderwith a replacementTlsStrategyfactory.
- 
Constructor Details- 
HttpComponentsHttpAsyncClientBuilderpublic HttpComponentsHttpAsyncClientBuilder()
 
- 
- 
Method Details- 
withCustomizerpublic HttpComponentsHttpAsyncClientBuilder withCustomizer(Consumer<org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder> customizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingHttpAsyncClientBuilder.- Parameters:
- customizer- the customizer to apply
- Returns:
- a new HttpComponentsHttpAsyncClientBuilderinstance
 
- 
withConnectionManagerCustomizerpublic HttpComponentsHttpAsyncClientBuilder withConnectionManagerCustomizer(Consumer<org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder> connectionManagerCustomizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingPoolingAsyncClientConnectionManagerBuilder.- Parameters:
- connectionManagerCustomizer- the customizer to apply
- Returns:
- a new HttpComponentsHttpAsyncClientBuilderinstance
 
- 
withConnectionConfigCustomizerpublic HttpComponentsHttpAsyncClientBuilder withConnectionConfigCustomizer(Consumer<org.apache.hc.client5.http.config.ConnectionConfig.Builder> connectionConfigCustomizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingConnectionConfig.Builder.- Parameters:
- connectionConfigCustomizer- the customizer to apply
- Returns:
- a new HttpComponentsHttpAsyncClientBuilderinstance
 
- 
withTlsStrategyFactorypublic HttpComponentsHttpAsyncClientBuilder withTlsStrategyFactory(Function<SslBundle, org.apache.hc.core5.http.nio.ssl.TlsStrategy> tlsStrategyFactory) Return a newHttpComponentsHttpAsyncClientBuilderwith a replacementTlsStrategyfactory.- Parameters:
- tlsStrategyFactory- the new factory used to create a- TlsStrategyfor a given- SslBundle
- Returns:
- a new HttpComponentsHttpAsyncClientBuilderinstance
 
- 
withDefaultRequestConfigCustomizerpublic HttpComponentsHttpAsyncClientBuilder withDefaultRequestConfigCustomizer(Consumer<org.apache.hc.client5.http.config.RequestConfig.Builder> defaultRequestConfigCustomizer) Return a newHttpComponentsHttpAsyncClientBuilderthat applies additional customization to the underlyingRequestConfig.Builderused for default requests.- Parameters:
- defaultRequestConfigCustomizer- the customizer to apply
- Returns:
- a new HttpComponentsHttpAsyncClientBuilderinstance
 
- 
buildpublic org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient build(HttpClientSettings settings) Build a newHttpAsyncClientinstance with the given settings applied.- Parameters:
- settings- the settings to apply
- Returns:
- a new CloseableHttpAsyncClientinstance
 
 
-