Package org.openqa.selenium.remote.http
Interface HttpClient.Factory
-
- Enclosing interface:
- HttpClient
public static interface HttpClient.Factory
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidcleanupIdleClients()Closes idle clients.static HttpClient.Factorycreate(java.lang.String name)Creates a new instance ofHttpClient.Factorywith the given name.default HttpClientcreateClient(java.net.URL url)Creates a HTTP client that will send requests to the given URL.HttpClientcreateClient(ClientConfig config)static HttpClient.FactorycreateDefault()Use thewebdriver.http.factorysystem property to determine which implementation ofHttpClient.Factoryshould be used.
-
-
-
Method Detail
-
create
static HttpClient.Factory create(java.lang.String name)
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:
java.lang.IllegalArgumentException- if no implementation with the given name can be foundjava.lang.IllegalStateException- if more than one implementation with the given name can be found
-
createDefault
static HttpClient.Factory createDefault()
Use thewebdriver.http.factorysystem property to determine which implementation ofHttpClient.Factoryshould be used. {@see create}
-
createClient
default HttpClient createClient(java.net.URL url)
Creates a HTTP client that will send requests to the given URL.- Parameters:
url- URL The base URL for requests.
-
createClient
HttpClient createClient(ClientConfig config)
-
cleanupIdleClients
default void cleanupIdleClients()
Closes idle clients.
-
-