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 TypeMethodDescriptionbuild(@Nullable HttpClientSettings settings) Build a fully configuredClientHttpConnector, applying the givensettingsif they are provided.protected HttpComponentsClientHttpConnectorcreateClientHttpConnector(HttpClientSettings settings) protected final List<Consumer<HttpComponentsClientHttpConnector>> protected final List<Consumer<HttpComponentsClientHttpConnector>> mergedCustomizers(Collection<Consumer<HttpComponentsClientHttpConnector>> customizers) protected final List<Consumer<HttpComponentsClientHttpConnector>> mergedCustomizers(Consumer<HttpComponentsClientHttpConnector> customizer) with(UnaryOperator<HttpComponentsClientHttpConnectorBuilder> customizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies the given 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<@Nullable SslBundle, @Nullable org.apache.hc.core5.http.nio.ssl.TlsStrategy> tlsStrategyFactory) Return a newHttpComponentsClientHttpConnectorBuilderwith a replacementTlsStrategyfactory.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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<@Nullable SslBundle, @Nullable 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
-
with
public HttpComponentsClientHttpConnectorBuilder with(UnaryOperator<HttpComponentsClientHttpConnectorBuilder> customizer) Return a newHttpComponentsClientHttpConnectorBuilderthat applies the given customizer. This can be useful for applying pre-packaged customizations.- Parameters:
customizer- the customizer to apply- Returns:
- a new
HttpComponentsClientHttpConnectorBuilder - Since:
- 4.0.0
-
createClientHttpConnector
-
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.
-