Class ReactorClientHttpRequestFactoryBuilder
java.lang.Object
org.springframework.boot.http.client.ReactorClientHttpRequestFactoryBuilder
- All Implemented Interfaces:
ClientHttpRequestFactoryBuilder<ReactorClientHttpRequestFactory>
Builder for
ClientHttpRequestFactoryBuilder.reactor().- Since:
- 3.4.0
- Author:
- Phillip Webb, Andy Wilkinson, Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionprotected final HttpClientSettingsbuild(ClientHttpRequestFactorySettings settings) Build a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.protected ReactorClientHttpRequestFactoryprotected final List<Consumer<ReactorClientHttpRequestFactory>>protected final List<Consumer<ReactorClientHttpRequestFactory>>mergedCustomizers(Collection<Consumer<ReactorClientHttpRequestFactory>> customizers) protected final List<Consumer<ReactorClientHttpRequestFactory>>mergedCustomizers(Consumer<ReactorClientHttpRequestFactory> customizer) withCustomizer(Consumer<ReactorClientHttpRequestFactory> customizer) Return a newClientHttpRequestFactoryBuilderthat applies the given customizer to theClientHttpRequestFactoryafter it has been built.withCustomizers(Collection<Consumer<ReactorClientHttpRequestFactory>> customizers) Return a newClientHttpRequestFactoryBuilderthat applies the given customizers to theClientHttpRequestFactoryafter it has been built.withHttpClientCustomizer(UnaryOperator<reactor.netty.http.client.HttpClient> httpClientCustomizer) Return a newReactorClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClient.withHttpClientFactory(Supplier<reactor.netty.http.client.HttpClient> factory) Return a newReactorClientHttpRequestFactoryBuilderthat uses the given factory to create the underlyingHttpClient.withReactorResourceFactory(ReactorResourceFactory reactorResourceFactory) Return a newReactorClientHttpRequestFactoryBuilderthat uses the givenReactorResourceFactoryto create the underlyingHttpClient.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 ReactorClientHttpRequestFactoryBuilder withCustomizer(Consumer<ReactorClientHttpRequestFactory> 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 ReactorClientHttpRequestFactoryBuilder withCustomizers(Collection<Consumer<ReactorClientHttpRequestFactory>> 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
-
withReactorResourceFactory
public ReactorClientHttpRequestFactoryBuilder withReactorResourceFactory(ReactorResourceFactory reactorResourceFactory) Return a newReactorClientHttpRequestFactoryBuilderthat uses the givenReactorResourceFactoryto create the underlyingHttpClient.- Parameters:
reactorResourceFactory- theReactorResourceFactoryto use- Returns:
- a new
ReactorClientHttpRequestFactoryBuilderinstance - Since:
- 3.5.0
-
withHttpClientFactory
public ReactorClientHttpRequestFactoryBuilder withHttpClientFactory(Supplier<reactor.netty.http.client.HttpClient> factory) Return a newReactorClientHttpRequestFactoryBuilderthat uses the given factory to create the underlyingHttpClient.- Parameters:
factory- the factory to use- Returns:
- a new
ReactorClientHttpRequestFactoryBuilderinstance - Since:
- 3.5.0
-
withHttpClientCustomizer
public ReactorClientHttpRequestFactoryBuilder withHttpClientCustomizer(UnaryOperator<reactor.netty.http.client.HttpClient> httpClientCustomizer) Return a newReactorClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClient.- Parameters:
httpClientCustomizer- the customizer to apply- Returns:
- a new
ReactorClientHttpRequestFactoryBuilderinstance
-
createClientHttpRequestFactory
protected ReactorClientHttpRequestFactory createClientHttpRequestFactory(ClientHttpRequestFactorySettings settings) -
getCustomizers
-
mergedCustomizers
protected final List<Consumer<ReactorClientHttpRequestFactory>> mergedCustomizers(Consumer<ReactorClientHttpRequestFactory> customizer) -
mergedCustomizers
protected final List<Consumer<ReactorClientHttpRequestFactory>> mergedCustomizers(Collection<Consumer<ReactorClientHttpRequestFactory>> customizers) -
build
Description copied from interface:ClientHttpRequestFactoryBuilderBuild a fully configuredClientHttpRequestFactory, applying the givensettingsif they are provided.- Specified by:
buildin interfaceClientHttpRequestFactoryBuilder<T extends ClientHttpRequestFactory>- Parameters:
settings- the settings to apply ornull- Returns:
- a fully configured
ClientHttpRequestFactory.
-
asHttpClientSettings
-