Package org.openqa.selenium.remote
Interface CommandCodec<T>
-
- Type Parameters:
T- The type of an encoded command.
- All Known Implementing Classes:
AbstractHttpCommandCodec,JsonHttpCommandCodec,W3CHttpCommandCodec
public interface CommandCodec<T>ConvertsCommandobjects to and from another representation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidalias(java.lang.String commandName, java.lang.String isAnAliasFor)Allow commands to have aliases.Commanddecode(T encodedCommand)Decodes a command.voiddefineCommand(java.lang.String name, org.openqa.selenium.remote.http.HttpMethod method, java.lang.String pathPattern)Enhance this command codec with additional commands.Tencode(Command command)Encodes a command.
-
-
-
Method Detail
-
encode
T encode(Command command)
Encodes a command.- Parameters:
command- the command to encode.- Returns:
- the encoded command.
- Throws:
org.openqa.selenium.UnsupportedCommandException- If the command is not supported by this codec.
-
decode
Command decode(T encodedCommand)
Decodes a command.- Parameters:
encodedCommand- the command to decode.- Returns:
- the decoded command.
- Throws:
org.openqa.selenium.UnsupportedCommandException- If the command is not supported by this codec.
-
defineCommand
void defineCommand(java.lang.String name, org.openqa.selenium.remote.http.HttpMethod method, java.lang.String pathPattern)Enhance this command codec with additional commands.
-
alias
void alias(java.lang.String commandName, java.lang.String isAnAliasFor)Allow commands to have aliases.- Parameters:
commandName- The command being added.isAnAliasFor- The command name that this is an alias for.
-
-