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 TypeMethodDescriptionvoid
Allow commands to have aliases.Decodes a command.void
defineCommand
(String name, HttpMethod method, String pathPattern) Enhance this command codec with additional commands.Encodes a command.boolean
isSupported
(String commandName)
-
Method Details
-
isSupported
- Returns:
- Whether this
CommandCodec
supports 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.
-