Package org.openqa.selenium.remote.codec
Class AbstractHttpCommandCodec
java.lang.Object
org.openqa.selenium.remote.codec.AbstractHttpCommandCodec
- All Implemented Interfaces:
CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
- Direct Known Subclasses:
W3CHttpCommandCodec
public abstract class AbstractHttpCommandCodec
extends Object
implements CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
A command codec that adheres to the W3C's WebDriver wire protocol.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Allow commands to have aliases.amendParameters
(String name, Map<String, ?> parameters) decode
(org.openqa.selenium.remote.http.HttpRequest encodedCommand) Decodes a command.protected void
defineCommand
(String name, AbstractHttpCommandCodec.CommandSpec spec) void
defineCommand
(String name, org.openqa.selenium.remote.http.HttpMethod method, String pathPattern) Defines a new command mapping.protected static AbstractHttpCommandCodec.CommandSpec
org.openqa.selenium.remote.http.HttpRequest
Encodes a command.protected static AbstractHttpCommandCodec.CommandSpec
boolean
isSupported
(String commandName) protected static AbstractHttpCommandCodec.CommandSpec
-
Constructor Details
-
AbstractHttpCommandCodec
public AbstractHttpCommandCodec()
-
-
Method Details
-
delete
-
get
-
post
-
isSupported
- Specified by:
isSupported
in interfaceCommandCodec<org.openqa.selenium.remote.http.HttpRequest>
- Returns:
- Whether this
CommandCodec
supports the given command name.
-
encode
Description copied from interface:CommandCodec
Encodes a command.- Specified by:
encode
in interfaceCommandCodec<org.openqa.selenium.remote.http.HttpRequest>
- Parameters:
command
- the command to encode.- Returns:
- the encoded command.
-
amendParameters
-
decode
Description copied from interface:CommandCodec
Decodes a command.- Specified by:
decode
in interfaceCommandCodec<org.openqa.selenium.remote.http.HttpRequest>
- Parameters:
encodedCommand
- the command to decode.- Returns:
- the decoded command.
-
defineCommand
public void defineCommand(String name, org.openqa.selenium.remote.http.HttpMethod method, String pathPattern) Defines a new command mapping.- Specified by:
defineCommand
in interfaceCommandCodec<org.openqa.selenium.remote.http.HttpRequest>
- Parameters:
name
- The command name.method
- The HTTP method to use for the command.pathPattern
- The URI path pattern for the command. When encoding a command, each path segment prefixed with a ":" will be replaced with the corresponding parameter from the encoded command.
-
alias
Description copied from interface:CommandCodec
Allow commands to have aliases.- Specified by:
alias
in interfaceCommandCodec<org.openqa.selenium.remote.http.HttpRequest>
- Parameters:
commandName
- The command being added.isAnAliasFor
- The command name that this is an alias for.
-
defineCommand
-