public abstract class AbstractHttpCommandCodec extends Object implements CommandCodec<HttpRequest>
| 构造器和说明 |
|---|
AbstractHttpCommandCodec() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
alias(String commandName,
String isAnAliasFor)
Allow commands to have aliases.
|
Command |
decode(HttpRequest encodedCommand)
Decodes a command.
|
void |
defineCommand(String name,
HttpMethod method,
String pathPattern)
Defines a new command mapping.
|
HttpRequest |
encode(Command command)
Encodes a command.
|
public HttpRequest encode(Command command)
CommandCodecencode 在接口中 CommandCodec<HttpRequest>command - the command to encode.public Command decode(HttpRequest encodedCommand)
CommandCodecdecode 在接口中 CommandCodec<HttpRequest>encodedCommand - the command to decode.public void defineCommand(String name, HttpMethod method, String pathPattern)
defineCommand 在接口中 CommandCodec<HttpRequest>name - The command name.method - The HTTP method to use for the command.pathPattern - The URI path pattern for the command. When encoding a command, each
path segment prefixed with a ":" will be replaced with the corresponding parameter
from the encoded command.public void alias(String commandName, String isAnAliasFor)
CommandCodecalias 在接口中 CommandCodec<HttpRequest>commandName - The command being added.isAnAliasFor - The command name that this is an alias for.