|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alipay.remoting.rpc.protocol.RpcProtocol
public class RpcProtocol
Request command protocol for v1 0 1 2 4 6 8 10 12 14 16 +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ |proto| type| cmdcode |ver2 | requestId |codec| timeout | classLen | +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+ |headerLen | contentLen | ... ... | +-----------+-----------+-----------+ + | className + header + content bytes | + + | ... ... | +-----------------------------------------------------------------------------------------------+ proto: code for protocol type: request/response/request oneway cmdcode: code for remoting command ver2:version for remoting command requestId: id of request codec: code for codec headerLen: length of header contentLen: length of content Response command protocol for v1 0 1 2 3 4 6 8 10 12 14 16 +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ |proto| type| cmdcode |ver2 | requestId |codec|respstatus | classLen |headerLen | +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+ | contentLen | ... ... | +-----------------------+ + | className + header + content bytes | + + | ... ... | +-----------------------------------------------------------------------------------------------+ respstatus: response status
| Field Summary | |
|---|---|
static byte |
PROTOCOL_CODE
|
| Constructor Summary | |
|---|---|
RpcProtocol()
|
|
| Method Summary | |
|---|---|
CommandFactory |
getCommandFactory()
Get the command factory for the protocol. |
CommandHandler |
getCommandHandler()
Get the command handler for the protocol. |
CommandDecoder |
getDecoder()
Get the decoder for the protocol. |
CommandEncoder |
getEncoder()
Get the encoder for the protocol. |
HeartbeatTrigger |
getHeartbeatTrigger()
Get the heartbeat trigger for the protocol. |
static int |
getRequestHeaderLength()
Get the length of request header. |
static int |
getResponseHeaderLength()
Get the length of response header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte PROTOCOL_CODE
| Constructor Detail |
|---|
public RpcProtocol()
| Method Detail |
|---|
public static int getRequestHeaderLength()
public static int getResponseHeaderLength()
public CommandEncoder getEncoder()
Protocol
getEncoder in interface Protocolpublic CommandDecoder getDecoder()
Protocol
getDecoder in interface Protocolpublic HeartbeatTrigger getHeartbeatTrigger()
Protocol
getHeartbeatTrigger in interface Protocolpublic CommandHandler getCommandHandler()
Protocol
getCommandHandler in interface Protocolpublic CommandFactory getCommandFactory()
Protocol
getCommandFactory in interface Protocol
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||