Interface ClientHttpConnectorBuilder<T extends ClientHttpConnector>
- Type Parameters:
- T- the- ClientHttpConnectortype
- All Known Implementing Classes:
- HttpComponentsClientHttpConnectorBuilder, JdkClientHttpConnectorBuilder, JettyClientHttpConnectorBuilder, ReactorClientHttpConnectorBuilder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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.- Since:
- 3.5.0
- Author:
- Phillip Webb
- 
Method SummaryModifier and TypeMethodDescriptiondefault Tbuild()Build a default configuredClientHttpConnectorBuilder.build(@Nullable HttpClientSettings 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(@Nullable 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.
- 
Method Details- 
buildBuild a default configuredClientHttpConnectorBuilder.- Returns:
- a default configured ClientHttpConnectorBuilder.
 
- 
buildBuild a fully configuredClientHttpConnector, applying the givensettingsif they are provided.- Parameters:
- settings- the settings to apply or- null
- Returns:
- a fully configured ClientHttpConnector.
 
- 
withCustomizerReturn a newClientHttpConnectorBuilderthat applies the given customizer to theClientHttpConnectorafter it has been built.- Parameters:
- customizer- the customizers to apply
- Returns:
- a new ClientHttpConnectorBuilderinstance
 
- 
withCustomizersReturn a newClientHttpConnectorBuilderthat applies the given customizers to theClientHttpConnectorafter it has been built.- Parameters:
- customizers- the customizers to apply
- Returns:
- a new ClientHttpConnectorBuilderinstance
 
- 
httpComponentsReturn aHttpComponentsClientHttpConnectorBuilderthat can be used to build aHttpComponentsClientHttpConnector.- Returns:
- a new HttpComponentsClientHttpConnectorBuilder
 
- 
jettyReturn aJettyClientHttpConnectorBuilderthat can be used to build aJettyClientHttpConnector.- Returns:
- a new JettyClientHttpConnectorBuilder
 
- 
reactorReturn aReactorClientHttpConnectorBuilderthat can be used to build aReactorClientHttpConnector.- Returns:
- a new ReactorClientHttpConnectorBuilder
 
- 
jdkReturn aJdkClientHttpConnectorBuilderthat can be used to build aJdkClientHttpConnector.- Returns:
- a new JdkClientHttpConnectorBuilder
 
- 
ofstatic <T extends ClientHttpConnector> ClientHttpConnectorBuilder<T> of(Class<T> clientHttpConnectorType) Return a newClientHttpConnectorBuilderfor the givenrequestFactoryType. The following implementations are supported:- Type Parameters:
- T- the- ClientHttpConnectortype
- Parameters:
- clientHttpConnectorType- the- ClientHttpConnectortype
- Returns:
- a new ClientHttpConnectorBuilder
 
- 
detectDetect the most suitableClientHttpConnectorBuilderbased on the classpath. The method favors builders in the following order:- Returns:
- the most suitable ClientHttpConnectorBuilderfor the classpath
 
- 
detectstatic ClientHttpConnectorBuilder<? extends ClientHttpConnector> detect(@Nullable ClassLoader classLoader) Detect the most suitableClientHttpConnectorBuilderbased on the classpath. The method favors builders in the following order:- Parameters:
- classLoader- the class loader to use for detection
- Returns:
- the most suitable ClientHttpConnectorBuilderfor the classpath
 
 
-