Package org.openqa.selenium.remote
Class HttpCommandExecutor
java.lang.Object
org.openqa.selenium.remote.HttpCommandExecutor
- All Implemented Interfaces:
NeedsLocalLogs,CommandExecutor
- Direct Known Subclasses:
DriverCommandExecutor
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal HttpClientprotected CommandCodec<HttpRequest>protected ResponseCodec<HttpResponse> -
Constructor Summary
ConstructorsConstructorDescriptionHttpCommandExecutor(URL addressOfRemoteServer) HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer) Creates anHttpCommandExecutorthat supports non-standardadditionalCommandsin addition to the standard.HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, ClientConfig config) HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, HttpClient.Factory httpClientFactory) HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, ClientConfig config, HttpClient.Factory httpClientFactory) HttpCommandExecutor(ClientConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalCommand(String commandName, CommandInfo info) Adds or updates additional commands.protected voiddefineCommand(String commandName, CommandInfo info) It may be useful to extend the commands understood by thisHttpCommandExecutorat run time, and this can be achieved via this method.Returns an immutable view of the additional commands.static HttpClient.FactoryvoidsetLocalLogs(LocalLogs logs)
-
Field Details
-
client
-
commandCodec
-
responseCodec
-
-
Constructor Details
-
HttpCommandExecutor
-
HttpCommandExecutor
-
HttpCommandExecutor
Creates anHttpCommandExecutorthat supports non-standardadditionalCommandsin addition to the standard.- Parameters:
additionalCommands- additional commands to allow the command executor to processaddressOfRemoteServer- URL of remote end Selenium server
-
HttpCommandExecutor
public HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, ClientConfig config) -
HttpCommandExecutor
public HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, URL addressOfRemoteServer, HttpClient.Factory httpClientFactory) -
HttpCommandExecutor
public HttpCommandExecutor(Map<String, CommandInfo> additionalCommands, ClientConfig config, HttpClient.Factory httpClientFactory)
-
-
Method Details
-
getDefaultClientFactory
-
getAdditionalCommands
Returns an immutable view of the additional commands.- Returns:
- an unmodifiable map of additional commands.
-
addAdditionalCommand
Adds or updates additional commands. This method is protected to allow subclasses to define their commands.- Parameters:
commandName- the name of the command to add or update.info- the CommandInfo for the command.
-
defineCommand
It may be useful to extend the commands understood by thisHttpCommandExecutorat run time, and this can be achieved via this method. Note, this is protected, and expected usage is for subclasses only to call this.- Parameters:
commandName- The name of the command to use.info- CommandInfo for the command name provided
-
setLocalLogs
- Specified by:
setLocalLogsin interfaceNeedsLocalLogs
-
getAddressOfRemoteServer
-
execute
- Specified by:
executein interfaceCommandExecutor- Throws:
IOException
-