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>
ConvertsCommand
objects to and from another representation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
alias(java.lang.String commandName, java.lang.String isAnAliasFor)
Allow commands to have aliases.Command
decode(T encodedCommand)
Decodes a command.void
defineCommand(java.lang.String name, org.openqa.selenium.remote.http.HttpMethod method, java.lang.String pathPattern)
Enhance this command codec with additional commands.T
encode(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.
-
-