类 ReactorHttpClientBuilder
java.lang.Object
org.springframework.boot.http.client.ReactorHttpClientBuilder
Builder that can be used to create a Rector Netty
HttpClient
.- 从以下版本开始:
- 3.5.0
- 作者:
- Phillip Webb, Andy Wilkinson, Scott Frederick
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明reactor.netty.http.client.HttpClient
build
(HttpClientSettings settings) Build a newHttpClient
instance with the given settings applied.withHttpClientCustomizer
(UnaryOperator<reactor.netty.http.client.HttpClient> customizer) Return a newReactorHttpClientBuilder
that applies additional customization to the underlyingHttpClient
.withHttpClientFactory
(Supplier<reactor.netty.http.client.HttpClient> factory) Return a newReactorHttpClientBuilder
that uses the given factory to create theHttpClient
.withReactorResourceFactory
(ReactorResourceFactory reactorResourceFactory) Return a newReactorHttpClientBuilder
that uses the givenReactorResourceFactory
to create theHttpClient
.
-
构造器详细资料
-
ReactorHttpClientBuilder
public ReactorHttpClientBuilder()
-
-
方法详细资料
-
withReactorResourceFactory
public ReactorHttpClientBuilder withReactorResourceFactory(ReactorResourceFactory reactorResourceFactory) Return a newReactorHttpClientBuilder
that uses the givenReactorResourceFactory
to create theHttpClient
.- 参数:
reactorResourceFactory
- theReactorResourceFactory
to use- 返回:
- a new
ReactorHttpClientBuilder
instance
-
withHttpClientFactory
public ReactorHttpClientBuilder withHttpClientFactory(Supplier<reactor.netty.http.client.HttpClient> factory) Return a newReactorHttpClientBuilder
that uses the given factory to create theHttpClient
.- 参数:
factory
- the factory to use- 返回:
- a new
ReactorHttpClientBuilder
instance
-
withHttpClientCustomizer
public ReactorHttpClientBuilder withHttpClientCustomizer(UnaryOperator<reactor.netty.http.client.HttpClient> customizer) Return a newReactorHttpClientBuilder
that applies additional customization to the underlyingHttpClient
.- 参数:
customizer
- the customizer to apply- 返回:
- a new
ReactorHttpClientBuilder
instance
-
build
Build a newHttpClient
instance with the given settings applied.- 参数:
settings
- the settings to apply- 返回:
- a new
HttpClient
instance
-