Class JettyHttpClientBuilder

java.lang.Object
org.springframework.boot.http.client.JettyHttpClientBuilder

public final class JettyHttpClientBuilder extends Object
Builder that can be used to create a Jetty HttpClient.
Since:
3.5.0
Author:
Phillip Webb, Andy Wilkinson, Scott Frederick
  • Constructor Details

    • JettyHttpClientBuilder

      public JettyHttpClientBuilder()
  • Method Details

    • withCustomizer

      public JettyHttpClientBuilder withCustomizer(Consumer<org.eclipse.jetty.client.HttpClient> customizer)
      Return a new JettyHttpClientBuilder that applies additional customization to the underlying HttpClient.
      Parameters:
      customizer - the customizer to apply
      Returns:
      a new JettyHttpClientBuilder instance
    • withHttpClientTransportFactory

      public JettyHttpClientBuilder withHttpClientTransportFactory(Function<org.eclipse.jetty.io.ClientConnector, org.eclipse.jetty.client.HttpClientTransport> httpClientTransportFactory)
      Return a new JettyHttpClientBuilder that uses the given factory to create the HttpClientTransport.
      Parameters:
      httpClientTransportFactory - the HttpClientTransport factory to use
      Returns:
      a new JettyHttpClientBuilder instance
      Since:
      4.0.0
    • withHttpClientTransportCustomizer

      public JettyHttpClientBuilder withHttpClientTransportCustomizer(Consumer<org.eclipse.jetty.client.HttpClientTransport> httpClientTransportCustomizer)
      Return a new JettyHttpClientBuilder that applies additional customization to the underlying HttpClientTransport.
      Parameters:
      httpClientTransportCustomizer - the customizer to apply
      Returns:
      a new JettyHttpClientBuilder instance
    • withClientConnectorCustomizerCustomizer

      public JettyHttpClientBuilder withClientConnectorCustomizerCustomizer(Consumer<org.eclipse.jetty.io.ClientConnector> clientConnectorCustomizerCustomizer)
      Return a new JettyHttpClientBuilder that applies additional customization to the underlying ClientConnector.
      Parameters:
      clientConnectorCustomizerCustomizer - the customizer to apply
      Returns:
      a new JettyHttpClientBuilder instance
    • build

      public org.eclipse.jetty.client.HttpClient build(@Nullable HttpClientSettings settings)
      Build a new HttpClient instance with the given settings applied.
      Parameters:
      settings - the settings to apply
      Returns:
      a new HttpClient instance