接口 ClientHttpConnectorBuilder<T extends ClientHttpConnector>
- 类型参数:
T
- theClientHttpConnector
type
- 所有已知实现类:
HttpComponentsClientHttpConnectorBuilder
,JdkClientHttpConnectorBuilder
,JettyClientHttpConnectorBuilder
,ReactorClientHttpConnectorBuilder
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Interface used to build a fully configured
ClientHttpConnector
. Builders for
Reactor
, Jetty
, Apache
HTTP Components
and JDK
can be obtained using the factory methods on
this interface. The of(Class)
method may be used to instantiate based on the
connector type.- 从以下版本开始:
- 3.5.0
- 作者:
- Phillip Webb
-
方法概要
修饰符和类型方法说明default T
build()
Build a default configuredClientHttpConnectorBuilder
.build
(ClientHttpConnectorSettings settings) Build a fully configuredClientHttpConnector
, applying the givensettings
if they are provided.static ClientHttpConnectorBuilder
<? extends ClientHttpConnector> detect()
Detect the most suitableClientHttpConnectorBuilder
based on the classpath.static ClientHttpConnectorBuilder
<? extends ClientHttpConnector> detect
(ClassLoader classLoader) Detect the most suitableClientHttpConnectorBuilder
based on the classpath.Return aHttpComponentsClientHttpConnectorBuilder
that can be used to build aHttpComponentsClientHttpConnector
.jdk()
Return aJdkClientHttpConnectorBuilder
that can be used to build aJdkClientHttpConnector
.jetty()
Return aJettyClientHttpConnectorBuilder
that can be used to build aJettyClientHttpConnector
.static <T extends ClientHttpConnector>
ClientHttpConnectorBuilder<T> Return a newClientHttpConnectorBuilder
for the givenrequestFactoryType
.reactor()
Return aReactorClientHttpConnectorBuilder
that can be used to build aReactorClientHttpConnector
.default ClientHttpConnectorBuilder
<T> withCustomizer
(Consumer<T> customizer) Return a newClientHttpConnectorBuilder
that applies the given customizer to theClientHttpConnector
after it has been built.default ClientHttpConnectorBuilder
<T> withCustomizers
(Collection<Consumer<T>> customizers) Return a newClientHttpConnectorBuilder
that applies the given customizers to theClientHttpConnector
after it has been built.
-
方法详细资料
-
build
Build a default configuredClientHttpConnectorBuilder
.- 返回:
- a default configured
ClientHttpConnectorBuilder
.
-
build
Build a fully configuredClientHttpConnector
, applying the givensettings
if they are provided.- 参数:
settings
- the settings to apply ornull
- 返回:
- a fully configured
ClientHttpConnector
.
-
withCustomizer
Return a newClientHttpConnectorBuilder
that applies the given customizer to theClientHttpConnector
after it has been built.- 参数:
customizer
- the customizers to apply- 返回:
- a new
ClientHttpConnectorBuilder
instance
-
withCustomizers
Return a newClientHttpConnectorBuilder
that applies the given customizers to theClientHttpConnector
after it has been built.- 参数:
customizers
- the customizers to apply- 返回:
- a new
ClientHttpConnectorBuilder
instance
-
httpComponents
Return aHttpComponentsClientHttpConnectorBuilder
that can be used to build aHttpComponentsClientHttpConnector
.- 返回:
- a new
HttpComponentsClientHttpConnectorBuilder
-
jetty
Return aJettyClientHttpConnectorBuilder
that can be used to build aJettyClientHttpConnector
.- 返回:
- a new
JettyClientHttpConnectorBuilder
-
reactor
Return aReactorClientHttpConnectorBuilder
that can be used to build aReactorClientHttpConnector
.- 返回:
- a new
ReactorClientHttpConnectorBuilder
-
jdk
Return aJdkClientHttpConnectorBuilder
that can be used to build aJdkClientHttpConnector
.- 返回:
- a new
JdkClientHttpConnectorBuilder
-
of
static <T extends ClientHttpConnector> ClientHttpConnectorBuilder<T> of(Class<T> clientHttpConnectorType) Return a newClientHttpConnectorBuilder
for the givenrequestFactoryType
. The following implementations are supported:- 类型参数:
T
- theClientHttpConnector
type- 参数:
clientHttpConnectorType
- theClientHttpConnector
type- 返回:
- a new
ClientHttpConnectorBuilder
-
detect
Detect the most suitableClientHttpConnectorBuilder
based on the classpath. The method favors builders in the following order:- 返回:
- the most suitable
ClientHttpConnectorBuilder
for the classpath
-
detect
Detect the most suitableClientHttpConnectorBuilder
based on the classpath. The method favors builders in the following order:- 参数:
classLoader
- the class loader to use for detection- 返回:
- the most suitable
ClientHttpConnectorBuilder
for the classpath
-