接口 ClientHttpConnectorBuilder<T extends ClientHttpConnector>
- 类型参数:
T- theClientHttpConnectortype
- 所有已知实现类:
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 Tbuild()Build a default configuredClientHttpConnectorBuilder.build(ClientHttpConnectorSettings settings) Build a fully configuredClientHttpConnector, applying the givensettingsif they are provided.static ClientHttpConnectorBuilder<? extends ClientHttpConnector> detect()Detect the most suitableClientHttpConnectorBuilderbased on the classpath.static ClientHttpConnectorBuilder<? extends ClientHttpConnector> detect(ClassLoader classLoader) Detect the most suitableClientHttpConnectorBuilderbased on the classpath.Return aHttpComponentsClientHttpConnectorBuilderthat can be used to build aHttpComponentsClientHttpConnector.jdk()Return aJdkClientHttpConnectorBuilderthat can be used to build aJdkClientHttpConnector.jetty()Return aJettyClientHttpConnectorBuilderthat can be used to build aJettyClientHttpConnector.static <T extends ClientHttpConnector>
ClientHttpConnectorBuilder<T> Return a newClientHttpConnectorBuilderfor the givenrequestFactoryType.reactor()Return aReactorClientHttpConnectorBuilderthat can be used to build aReactorClientHttpConnector.default ClientHttpConnectorBuilder<T> withCustomizer(Consumer<T> customizer) Return a newClientHttpConnectorBuilderthat applies the given customizer to theClientHttpConnectorafter it has been built.default ClientHttpConnectorBuilder<T> withCustomizers(Collection<Consumer<T>> customizers) Return a newClientHttpConnectorBuilderthat applies the given customizers to theClientHttpConnectorafter it has been built.
-
方法详细资料
-
build
Build a default configuredClientHttpConnectorBuilder.- 返回:
- a default configured
ClientHttpConnectorBuilder.
-
build
Build a fully configuredClientHttpConnector, applying the givensettingsif they are provided.- 参数:
settings- the settings to apply ornull- 返回:
- a fully configured
ClientHttpConnector.
-
withCustomizer
Return a newClientHttpConnectorBuilderthat applies the given customizer to theClientHttpConnectorafter it has been built.- 参数:
customizer- the customizers to apply- 返回:
- a new
ClientHttpConnectorBuilderinstance
-
withCustomizers
Return a newClientHttpConnectorBuilderthat applies the given customizers to theClientHttpConnectorafter it has been built.- 参数:
customizers- the customizers to apply- 返回:
- a new
ClientHttpConnectorBuilderinstance
-
httpComponents
Return aHttpComponentsClientHttpConnectorBuilderthat can be used to build aHttpComponentsClientHttpConnector.- 返回:
- a new
HttpComponentsClientHttpConnectorBuilder
-
jetty
Return aJettyClientHttpConnectorBuilderthat can be used to build aJettyClientHttpConnector.- 返回:
- a new
JettyClientHttpConnectorBuilder
-
reactor
Return aReactorClientHttpConnectorBuilderthat can be used to build aReactorClientHttpConnector.- 返回:
- a new
ReactorClientHttpConnectorBuilder
-
jdk
Return aJdkClientHttpConnectorBuilderthat can be used to build aJdkClientHttpConnector.- 返回:
- a new
JdkClientHttpConnectorBuilder
-
of
static <T extends ClientHttpConnector> ClientHttpConnectorBuilder<T> of(Class<T> clientHttpConnectorType) Return a newClientHttpConnectorBuilderfor the givenrequestFactoryType. The following implementations are supported:- 类型参数:
T- theClientHttpConnectortype- 参数:
clientHttpConnectorType- theClientHttpConnectortype- 返回:
- a new
ClientHttpConnectorBuilder
-
detect
Detect the most suitableClientHttpConnectorBuilderbased on the classpath. The method favors builders in the following order:- 返回:
- the most suitable
ClientHttpConnectorBuilderfor the classpath
-
detect
Detect the most suitableClientHttpConnectorBuilderbased on the classpath. The method favors builders in the following order:- 参数:
classLoader- the class loader to use for detection- 返回:
- the most suitable
ClientHttpConnectorBuilderfor the classpath
-