Package org.openqa.selenium.remote
Interface CommandCodec<T>
- Type Parameters:
T- The type of encoded command.
- All Known Implementing Classes:
AbstractHttpCommandCodec,W3CHttpCommandCodec
public interface CommandCodec<T>
Converts
Command objects to and from another representation.-
Method Summary
Modifier and TypeMethodDescriptionvoidAllow commands to have aliases.Decodes a command.voiddefineCommand(String name, HttpMethod method, String pathPattern) Enhance this command codec with additional commands.Encodes a command.booleanisSupported(String commandName)
-
Method Details
-
isSupported
- Returns:
- Whether this
CommandCodecsupports the given command name.
-
encode
Encodes a command.- Parameters:
command- the command to encode.- Returns:
- the encoded command.
- Throws:
UnsupportedCommandException- If the command is not supported by this codec.
-
decode
Decodes a command.- Parameters:
encodedCommand- the command to decode.- Returns:
- the decoded command.
- Throws:
UnsupportedCommandException- If the command is not supported by this codec.
-
defineCommand
Enhance this command codec with additional commands. -
alias
Allow commands to have aliases.- Parameters:
commandName- The command being added.isAnAliasFor- The command name that this is an alias for.
-