Class JdkClientHttpRequestFactoryBuilder
java.lang.Object
org.springframework.boot.http.client.JdkClientHttpRequestFactoryBuilder
- All Implemented Interfaces:
ClientHttpRequestFactoryBuilder<org.springframework.http.client.JdkClientHttpRequestFactory>
Builder for
ClientHttpRequestFactoryBuilder.jdk().- Since:
- 3.4.0
-
Method Summary
Modifier and TypeMethodDescriptionfinal org.springframework.http.client.JdkClientHttpRequestFactorybuild(ClientHttpRequestFactorySettings settings) Build a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.protected org.springframework.http.client.JdkClientHttpRequestFactoryprotected static <T> Consumer<T>mergedCustomizers(Collection<Consumer<org.springframework.http.client.JdkClientHttpRequestFactory>> customizers) mergedCustomizers(Consumer<org.springframework.http.client.JdkClientHttpRequestFactory> customizer) withCustomizer(Consumer<org.springframework.http.client.JdkClientHttpRequestFactory> customizer) Return a newClientHttpRequestFactoryBuilderthat applies the given customizer to theClientHttpRequestFactoryafter it has been built.withCustomizers(Collection<Consumer<org.springframework.http.client.JdkClientHttpRequestFactory>> customizers) Return a newClientHttpRequestFactoryBuilderthat applies the given customizers to theClientHttpRequestFactoryafter it has been built.withHttpClientCustomizer(Consumer<HttpClient.Builder> httpClientCustomizer) Return a newJdkClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClient.Builder.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.ClientHttpRequestFactoryBuilder
build
-
Method Details
-
withCustomizer
public JdkClientHttpRequestFactoryBuilder withCustomizer(Consumer<org.springframework.http.client.JdkClientHttpRequestFactory> customizer) Description copied from interface:ClientHttpRequestFactoryBuilderReturn a newClientHttpRequestFactoryBuilderthat applies the given customizer to theClientHttpRequestFactoryafter it has been built.- Parameters:
customizer- the customizers to apply- Returns:
- a new
ClientHttpRequestFactoryBuilderinstance
-
withCustomizers
public JdkClientHttpRequestFactoryBuilder withCustomizers(Collection<Consumer<org.springframework.http.client.JdkClientHttpRequestFactory>> customizers) Description copied from interface:ClientHttpRequestFactoryBuilderReturn a newClientHttpRequestFactoryBuilderthat applies the given customizers to theClientHttpRequestFactoryafter it has been built.- Parameters:
customizers- the customizers to apply- Returns:
- a new
ClientHttpRequestFactoryBuilderinstance
-
withHttpClientCustomizer
public JdkClientHttpRequestFactoryBuilder withHttpClientCustomizer(Consumer<HttpClient.Builder> httpClientCustomizer) Return a newJdkClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClient.Builder.- Parameters:
httpClientCustomizer- the customizer to apply- Returns:
- a new
JdkClientHttpRequestFactoryBuilderinstance
-
createClientHttpRequestFactory
protected org.springframework.http.client.JdkClientHttpRequestFactory createClientHttpRequestFactory(ClientHttpRequestFactorySettings settings) -
emptyCustomizer
-
getCustomizers
-
mergedCustomizers
-
mergedCustomizers
protected final List<Consumer<org.springframework.http.client.JdkClientHttpRequestFactory>> mergedCustomizers(Collection<Consumer<org.springframework.http.client.JdkClientHttpRequestFactory>> customizers) -
build
public final org.springframework.http.client.JdkClientHttpRequestFactory build(ClientHttpRequestFactorySettings settings) Description copied from interface:ClientHttpRequestFactoryBuilderBuild a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.- Specified by:
buildin interfaceClientHttpRequestFactoryBuilder<T extends org.springframework.http.client.ClientHttpRequestFactory>- Parameters:
settings- the settings to apply ornull- Returns:
- a fully configured
ClientHttpRequestFactory.
-