Class HttpComponentsClientHttpConnectorBuilder
java.lang.Object
org.springframework.boot.http.client.reactive.HttpComponentsClientHttpConnectorBuilder
- All Implemented Interfaces:
ClientHttpConnectorBuilder<HttpComponentsClientHttpConnector>
Builder for
ClientHttpConnectorBuilder.httpComponents().- Since:
- 3.5.0
- Author:
- Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionprotected final HttpClientSettingsbuild(ClientHttpConnectorSettings settings) Build a fully configuredClientHttpConnector, applying the givensettingsif they are provided.protected HttpComponentsClientHttpConnectorprotected final List<Consumer<HttpComponentsClientHttpConnector>>protected final List<Consumer<HttpComponentsClientHttpConnector>>mergedCustomizers(Collection<Consumer<HttpComponentsClientHttpConnector>> customizers) protected final List<Consumer<HttpComponentsClientHttpConnector>>mergedCustomizers(Consumer<HttpComponentsClientHttpConnector> customizer) withConnectionConfigCustomizer(Consumer<org.apache.hc.client5.http.config.ConnectionConfig.Builder> connectionConfigCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingConnectionConfig.Builder.withConnectionManagerCustomizer(Consumer<org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder> connectionManagerCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingPoolingAsyncClientConnectionManagerBuilder.withDefaultRequestConfigCustomizer(Consumer<org.apache.hc.client5.http.config.RequestConfig.Builder> defaultRequestConfigCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingRequestConfig.Builderused for default requests.withHttpClientCustomizer(Consumer<org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder> httpClientCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingHttpAsyncClientBuilder.withTlsSocketStrategyFactory(Function<SslBundle, org.apache.hc.core5.http.nio.ssl.TlsStrategy> tlsStrategyFactory) Return a newHttpComponentsClientHttpConnectorBuilderwith a replacementTlsStrategyfactory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.http.client.reactive.ClientHttpConnectorBuilder
build, withCustomizer, withCustomizers
-
Method Details
-
withHttpClientCustomizer
public HttpComponentsClientHttpConnectorBuilder withHttpClientCustomizer(Consumer<org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder> httpClientCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingHttpAsyncClientBuilder.- Parameters:
httpClientCustomizer- the customizer to apply- Returns:
- a new
HttpComponentsHttpAsyncClientBuilderinstance
-
withConnectionManagerCustomizer
public HttpComponentsClientHttpConnectorBuilder withConnectionManagerCustomizer(Consumer<org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder> connectionManagerCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingPoolingAsyncClientConnectionManagerBuilder.- Parameters:
connectionManagerCustomizer- the customizer to apply- Returns:
- a new
HttpComponentsClientHttpConnectorBuilderinstance
-
withConnectionConfigCustomizer
public HttpComponentsClientHttpConnectorBuilder withConnectionConfigCustomizer(Consumer<org.apache.hc.client5.http.config.ConnectionConfig.Builder> connectionConfigCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingConnectionConfig.Builder.- Parameters:
connectionConfigCustomizer- the customizer to apply- Returns:
- a new
HttpComponentsClientHttpConnectorBuilderinstance
-
withTlsSocketStrategyFactory
public HttpComponentsClientHttpConnectorBuilder withTlsSocketStrategyFactory(Function<SslBundle, org.apache.hc.core5.http.nio.ssl.TlsStrategy> tlsStrategyFactory) Return a newHttpComponentsClientHttpConnectorBuilderwith a replacementTlsStrategyfactory.- Parameters:
tlsStrategyFactory- the new factory used to create aTlsStrategyfor a givenSslBundle- Returns:
- a new
HttpComponentsClientHttpConnectorBuilderinstance
-
withDefaultRequestConfigCustomizer
public HttpComponentsClientHttpConnectorBuilder withDefaultRequestConfigCustomizer(Consumer<org.apache.hc.client5.http.config.RequestConfig.Builder> defaultRequestConfigCustomizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies additional customization to the underlyingRequestConfig.Builderused for default requests.- Parameters:
defaultRequestConfigCustomizer- the customizer to apply- Returns:
- a new
HttpComponentsClientHttpConnectorBuilderinstance
-
createClientHttpConnector
protected HttpComponentsClientHttpConnector createClientHttpConnector(ClientHttpConnectorSettings settings) -
getCustomizers
-
mergedCustomizers
protected final List<Consumer<HttpComponentsClientHttpConnector>> mergedCustomizers(Consumer<HttpComponentsClientHttpConnector> customizer) -
mergedCustomizers
protected final List<Consumer<HttpComponentsClientHttpConnector>> mergedCustomizers(Collection<Consumer<HttpComponentsClientHttpConnector>> customizers) -
build
Description copied from interface:ClientHttpConnectorBuilderBuild a fully configuredClientHttpConnector, applying the givensettingsif they are provided.- Specified by:
buildin interfaceClientHttpConnectorBuilder<T extends ClientHttpConnector>- Parameters:
settings- the settings to apply ornull- Returns:
- a fully configured
ClientHttpConnector.
-
asHttpClientSettings
-