Package org.openqa.selenium.remote.http
Interface HttpClient.Factory
- All Known Implementing Classes:
JdkHttpClient.Factory,RoutableHttpClientFactory,TracedHttpClient.Factory
- Enclosing interface:
- HttpClient
public static interface HttpClient.Factory
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCloses idle clients.static HttpClient.FactoryCreates a new instance ofHttpClient.Factorywith the given name.default HttpClientcreateClient(URL url) Creates a HTTP client that will send requests to the given URL.createClient(ClientConfig config) static HttpClient.FactoryUse thewebdriver.http.factorysystem property to determine which implementation ofHttpClient.Factoryshould be used.
-
Method Details
-
create
Creates a new instance ofHttpClient.Factorywith the given name. It usesServiceLoaderto find all available implementations and selects the class that has an {@link @HttpClientName} annotation with the given name as the value.- Throws:
IllegalArgumentException- if no implementation with the given name can be foundIllegalStateException- if more than one implementation with the given name can be found
-
createDefault
Use thewebdriver.http.factorysystem property to determine which implementation ofHttpClient.Factoryshould be used. -
createClient
Creates a HTTP client that will send requests to the given URL.- Parameters:
url- URL The base URL for requests.
-
createClient
-
cleanupIdleClients
default void cleanupIdleClients()Closes idle clients.
-