Package org.openqa.selenium.remote.http
Interface HttpClient.Factory
- Enclosing interface:
- HttpClient
public static interface HttpClient.Factory
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Closes idle clients.static HttpClient.Factory
Creates a new instance ofHttpClient.Factory
with the given name.default HttpClient
createClient
(URL url) Creates a HTTP client that will send requests to the given URL.createClient
(ClientConfig config) static HttpClient.Factory
Use thewebdriver.http.factory
system property to determine which implementation ofHttpClient.Factory
should be used.
-
Method Details
-
create
Creates a new instance ofHttpClient.Factory
with the given name. It usesServiceLoader
to 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.factory
system property to determine which implementation ofHttpClient.Factory
should 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.
-