Class JettyHttpClientBuilder
java.lang.Object
org.springframework.boot.http.client.JettyHttpClientBuilder
Builder that can be used to create a Jetty
HttpClient.- Since:
- 3.5.0
- Author:
- Phillip Webb, Andy Wilkinson, Scott Frederick
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.client.HttpClientbuild(HttpClientSettings settings) Build a newHttpClientinstance with the given settings applied.withClientConnectorCustomizerCustomizer(Consumer<org.eclipse.jetty.io.ClientConnector> clientConnectorCustomizerCustomizer) Return a newJettyClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingClientConnector.withCustomizer(Consumer<org.eclipse.jetty.client.HttpClient> customizer) Return a newJettyClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClient.withHttpClientTransportCustomizer(Consumer<org.eclipse.jetty.client.HttpClientTransport> httpClientTransportCustomizer) Return a newJettyClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClientTransport.
-
Constructor Details
-
JettyHttpClientBuilder
public JettyHttpClientBuilder()
-
-
Method Details
-
withCustomizer
public JettyHttpClientBuilder withCustomizer(Consumer<org.eclipse.jetty.client.HttpClient> customizer) Return a newJettyClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClient.- Parameters:
customizer- the customizer to apply- Returns:
- a new
JettyClientHttpRequestFactoryBuilderinstance
-
withHttpClientTransportCustomizer
public JettyHttpClientBuilder withHttpClientTransportCustomizer(Consumer<org.eclipse.jetty.client.HttpClientTransport> httpClientTransportCustomizer) Return a newJettyClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingHttpClientTransport.- Parameters:
httpClientTransportCustomizer- the customizer to apply- Returns:
- a new
JettyClientHttpRequestFactoryBuilderinstance
-
withClientConnectorCustomizerCustomizer
public JettyHttpClientBuilder withClientConnectorCustomizerCustomizer(Consumer<org.eclipse.jetty.io.ClientConnector> clientConnectorCustomizerCustomizer) Return a newJettyClientHttpRequestFactoryBuilderthat applies additional customization to the underlyingClientConnector.- Parameters:
clientConnectorCustomizerCustomizer- the customizer to apply- Returns:
- a new
JettyClientHttpRequestFactoryBuilderinstance
-
build
Build a newHttpClientinstance with the given settings applied.- Parameters:
settings- the settings to apply- Returns:
- a new
HttpClientinstance
-