T - The type of an encoded command.public interface CommandCodec<T>
Command objects to and from another representation.| 限定符和类型 | 方法和说明 |
|---|---|
void |
alias(String commandName,
String isAnAliasFor)
Allow commands to have aliases.
|
Command |
decode(T encodedCommand)
Decodes a command.
|
void |
defineCommand(String name,
HttpMethod method,
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.UnsupportedCommandException - If the command is not supported by this codec.Command decode(T encodedCommand)
encodedCommand - the command to decode.UnsupportedCommandException - If the command is not supported by this codec.void defineCommand(String name, HttpMethod method, String pathPattern)