Interface HttpClient.Factory

All Known Implementing Classes:
JdkHttpClient.Factory, RoutableHttpClientFactory, TracedHttpClient.Factory
Enclosing interface:

public static interface HttpClient.Factory
  • Method Details

    • create

      static HttpClient.Factory create(String name)
      Creates a new instance of HttpClient.Factory with the given name. It uses ServiceLoader to find all available implementations and selects the class that has an {@link @HttpClientName} annotation with the given name as the value.
      IllegalArgumentException - if no implementation with the given name can be found
      IllegalStateException - if more than one implementation with the given name can be found
    • createDefault

      static HttpClient.Factory createDefault()
      Use the webdriver.http.factory system property to determine which implementation of HttpClient.Factory should be used.

    • createClient

      default HttpClient createClient(URL url)
      Creates a HTTP client that will send requests to the given URL.
      url - URL The base URL for requests.
    • createClient

      HttpClient createClient(ClientConfig config)
    • cleanupIdleClients

      default void cleanupIdleClients()
      Closes idle clients.