Class JdkClientHttpRequestFactoryBuilder
java.lang.Object
org.springframework.boot.http.client.JdkClientHttpRequestFactoryBuilder
- All Implemented Interfaces:
ClientHttpRequestFactoryBuilder<JdkClientHttpRequestFactory>
Builder for
ClientHttpRequestFactoryBuilder.jdk()
.- Since:
- 3.4.0
- Author:
- Phillip Webb, Andy Wilkinson, Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(ClientHttpRequestFactorySettings settings) Build a fully configuredClientHttpRequestFactory
, applying the givensettings
if they are provided.protected JdkClientHttpRequestFactory
protected static <T> Consumer<T>
protected final List<Consumer<JdkClientHttpRequestFactory>>
protected final List<Consumer<JdkClientHttpRequestFactory>>
mergedCustomizers
(Collection<Consumer<JdkClientHttpRequestFactory>> customizers) protected final List<Consumer<JdkClientHttpRequestFactory>>
mergedCustomizers
(Consumer<JdkClientHttpRequestFactory> customizer) withCustomizer
(Consumer<JdkClientHttpRequestFactory> customizer) Return a newClientHttpRequestFactoryBuilder
that applies the given customizer to theClientHttpRequestFactory
after it has been built.withCustomizers
(Collection<Consumer<JdkClientHttpRequestFactory>> customizers) Return a newClientHttpRequestFactoryBuilder
that applies the given customizers to theClientHttpRequestFactory
after it has been built.withHttpClientCustomizer
(Consumer<HttpClient.Builder> httpClientCustomizer) Return a newJdkClientHttpRequestFactoryBuilder
that applies additional customization to the underlyingHttpClient.Builder
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder
build
-
Method Details
-
withCustomizer
public JdkClientHttpRequestFactoryBuilder withCustomizer(Consumer<JdkClientHttpRequestFactory> customizer) Description copied from interface:ClientHttpRequestFactoryBuilder
Return a newClientHttpRequestFactoryBuilder
that applies the given customizer to theClientHttpRequestFactory
after it has been built.- Parameters:
customizer
- the customizers to apply- Returns:
- a new
ClientHttpRequestFactoryBuilder
instance
-
withCustomizers
public JdkClientHttpRequestFactoryBuilder withCustomizers(Collection<Consumer<JdkClientHttpRequestFactory>> customizers) Description copied from interface:ClientHttpRequestFactoryBuilder
Return a newClientHttpRequestFactoryBuilder
that applies the given customizers to theClientHttpRequestFactory
after it has been built.- Parameters:
customizers
- the customizers to apply- Returns:
- a new
ClientHttpRequestFactoryBuilder
instance
-
withHttpClientCustomizer
public JdkClientHttpRequestFactoryBuilder withHttpClientCustomizer(Consumer<HttpClient.Builder> httpClientCustomizer) Return a newJdkClientHttpRequestFactoryBuilder
that applies additional customization to the underlyingHttpClient.Builder
.- Parameters:
httpClientCustomizer
- the customizer to apply- Returns:
- a new
JdkClientHttpRequestFactoryBuilder
instance
-
createClientHttpRequestFactory
protected JdkClientHttpRequestFactory createClientHttpRequestFactory(ClientHttpRequestFactorySettings settings) -
emptyCustomizer
-
getCustomizers
-
mergedCustomizers
protected final List<Consumer<JdkClientHttpRequestFactory>> mergedCustomizers(Consumer<JdkClientHttpRequestFactory> customizer) -
mergedCustomizers
protected final List<Consumer<JdkClientHttpRequestFactory>> mergedCustomizers(Collection<Consumer<JdkClientHttpRequestFactory>> customizers) -
build
Description copied from interface:ClientHttpRequestFactoryBuilder
Build a fully configuredClientHttpRequestFactory
, applying the givensettings
if they are provided.- Specified by:
build
in interfaceClientHttpRequestFactoryBuilder<T extends ClientHttpRequestFactory>
- Parameters:
settings
- the settings to apply ornull
- Returns:
- a fully configured
ClientHttpRequestFactory
.
-