|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alipay.remoting.rpc.RpcCommand
public abstract class RpcCommand
Remoting command.
A remoting command stands for a kind of transfer object in the network communication layer.
| Constructor Summary | |
|---|---|
RpcCommand()
|
|
RpcCommand(byte type)
|
|
RpcCommand(byte version,
byte type,
CommandCode cmdCode)
|
|
RpcCommand(byte type,
CommandCode cmdCode)
|
|
RpcCommand(CommandCode cmdCode)
|
|
| Method Summary | |
|---|---|
void |
deserialize()
Deserialize the class header and content. |
void |
deserialize(long mask)
Deserialize according to mask. |
void |
deserializeClazz()
Deserialize the content class. |
void |
deserializeContent(InvokeContext invokeContext)
Deserialize the content. |
void |
deserializeHeader(InvokeContext invokeContext)
Deserialize the header. |
byte[] |
getClazz()
|
short |
getClazzLength()
|
CommandCode |
getCmdCode()
Get the command code for this command |
byte[] |
getContent()
|
int |
getContentLength()
|
byte[] |
getHeader()
|
short |
getHeaderLength()
|
int |
getId()
Get the id of the command |
InvokeContext |
getInvokeContext()
Get invoke context for this command |
ProtocolCode |
getProtocolCode()
Get the code of the protocol that this command belongs to |
ProtocolSwitch |
getProtocolSwitch()
Get the protocol switch status for this command |
byte |
getSerializer()
Get serializer type for this command |
byte |
getType()
|
byte |
getVersion()
|
void |
serialize()
Serialize the class header and content. |
void |
serializeClazz()
Serialize content class. |
void |
serializeContent(InvokeContext invokeContext)
Serialize the content. |
void |
serializeHeader(InvokeContext invokeContext)
Serialize the header. |
void |
setClazz(byte[] clazz)
|
void |
setCmdCode(CommandCode cmdCode)
|
void |
setContent(byte[] content)
|
void |
setHeader(byte[] header)
|
void |
setId(int id)
|
void |
setInvokeContext(InvokeContext invokeContext)
|
void |
setProtocolSwitch(ProtocolSwitch protocolSwitch)
|
void |
setSerializer(byte serializer)
|
void |
setType(byte type)
|
void |
setVersion(byte version)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RpcCommand()
public RpcCommand(byte type)
public RpcCommand(CommandCode cmdCode)
public RpcCommand(byte type,
CommandCode cmdCode)
public RpcCommand(byte version,
byte type,
CommandCode cmdCode)
| Method Detail |
|---|
public void serialize()
throws SerializationException
serialize in interface RemotingCommandException
SerializationException
public void deserialize()
throws DeserializationException
deserialize in interface RemotingCommandException
DeserializationException
public void deserialize(long mask)
throws DeserializationException
RpcDeserializeLevel.DESERIALIZE_CLAZZ, only deserialize clazz - only one part.RpcDeserializeLevel.DESERIALIZE_HEADER, deserialize clazz and header - two parts.RpcDeserializeLevel.DESERIALIZE_ALL, deserialize clazz, header and content - all three parts.
mask -
CodecException
DeserializationException
public void serializeClazz()
throws SerializationException
Exception
SerializationException
public void deserializeClazz()
throws DeserializationException
Exception
DeserializationException
public void serializeHeader(InvokeContext invokeContext)
throws SerializationException
Exception
SerializationException
public void serializeContent(InvokeContext invokeContext)
throws SerializationException
serializeContent in interface RemotingCommandException
SerializationException
public void deserializeHeader(InvokeContext invokeContext)
throws DeserializationException
Exception
DeserializationException
public void deserializeContent(InvokeContext invokeContext)
throws DeserializationException
deserializeContent in interface RemotingCommandException
DeserializationExceptionpublic ProtocolCode getProtocolCode()
RemotingCommand
getProtocolCode in interface RemotingCommandpublic CommandCode getCmdCode()
RemotingCommand
getCmdCode in interface RemotingCommandpublic InvokeContext getInvokeContext()
RemotingCommand
getInvokeContext in interface RemotingCommandpublic byte getSerializer()
RemotingCommand
getSerializer in interface RemotingCommandpublic ProtocolSwitch getProtocolSwitch()
RemotingCommand
getProtocolSwitch in interface RemotingCommandpublic void setCmdCode(CommandCode cmdCode)
public byte getVersion()
public void setVersion(byte version)
public byte getType()
public void setType(byte type)
public void setSerializer(byte serializer)
public void setProtocolSwitch(ProtocolSwitch protocolSwitch)
public int getId()
RemotingCommand
getId in interface RemotingCommandpublic void setId(int id)
public byte[] getHeader()
public void setHeader(byte[] header)
public byte[] getContent()
public void setContent(byte[] content)
public short getHeaderLength()
public int getContentLength()
public short getClazzLength()
public byte[] getClazz()
public void setClazz(byte[] clazz)
public void setInvokeContext(InvokeContext invokeContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||