Class SimpleClientHttpRequestFactoryBuilder
java.lang.Object
org.springframework.boot.http.client.SimpleClientHttpRequestFactoryBuilder
- All Implemented Interfaces:
ClientHttpRequestFactoryBuilder<org.springframework.http.client.SimpleClientHttpRequestFactory>
Builder for
ClientHttpRequestFactoryBuilder.simple().- Since:
- 3.4.0
-
Method Summary
Modifier and TypeMethodDescriptionfinal org.springframework.http.client.SimpleClientHttpRequestFactorybuild(@Nullable HttpClientSettings settings) Build a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.protected org.springframework.http.client.SimpleClientHttpRequestFactorymergedCustomizers(Collection<Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory>> customizers) mergedCustomizers(Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory> customizer) with(UnaryOperator<SimpleClientHttpRequestFactoryBuilder> customizer) Return a newSimpleClientHttpRequestFactoryBuilderthat applies the given customizer.withCustomizer(Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory> customizer) Return a newClientHttpRequestFactoryBuilderthat applies the given customizer to theClientHttpRequestFactoryafter it has been built.withCustomizers(Collection<Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory>> customizers) Return a newClientHttpRequestFactoryBuilderthat applies the given customizers to theClientHttpRequestFactoryafter it has been built.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClientHttpRequestFactoryBuilder
build
-
Method Details
-
withCustomizer
public SimpleClientHttpRequestFactoryBuilder withCustomizer(Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory> 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 SimpleClientHttpRequestFactoryBuilder withCustomizers(Collection<Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory>> 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
-
with
public SimpleClientHttpRequestFactoryBuilder with(UnaryOperator<SimpleClientHttpRequestFactoryBuilder> customizer) Return a newSimpleClientHttpRequestFactoryBuilderthat applies the given customizer. This can be useful for applying pre-packaged customizations.- Parameters:
customizer- the customizer to apply- Returns:
- a new
SimpleClientHttpRequestFactoryBuilder - Since:
- 4.0.0
-
createClientHttpRequestFactory
protected org.springframework.http.client.SimpleClientHttpRequestFactory createClientHttpRequestFactory(HttpClientSettings settings) -
getCustomizers
-
mergedCustomizers
-
mergedCustomizers
protected final List<Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory>> mergedCustomizers(Collection<Consumer<org.springframework.http.client.SimpleClientHttpRequestFactory>> customizers) -
build
public final org.springframework.http.client.SimpleClientHttpRequestFactory build(@Nullable HttpClientSettings 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.
-