T
- The type of an encoded command.public interface CommandCodec<T>
Command
objects to and from another representation.Modifier and Type | Method and 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,
HttpMethod method,
java.lang.String pathPattern)
Enhance this command codec with additional commands.
|
T |
encode(Command command)
Encodes a command.
|
T encode(Command command)
command
- the command to encode.org.openqa.selenium.UnsupportedCommandException
- If the command is not supported by this codec.Command decode(T encodedCommand)
encodedCommand
- the command to decode.org.openqa.selenium.UnsupportedCommandException
- If the command is not supported by this codec.void defineCommand(java.lang.String name, HttpMethod method, java.lang.String pathPattern)
void alias(java.lang.String commandName, java.lang.String isAnAliasFor)
commandName
- The command being added.isAnAliasFor
- The command name that this is an alias for.