public abstract class RpcCommand extends Object implements RemotingCommand
| 构造器和说明 |
|---|
RpcCommand() |
RpcCommand(byte type) |
RpcCommand(byte version,
byte type,
CommandCode cmdCode) |
RpcCommand(byte type,
CommandCode cmdCode) |
RpcCommand(CommandCode cmdCode) |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
public RpcCommand()
public RpcCommand(byte type)
public RpcCommand(CommandCode cmdCode)
public RpcCommand(byte type,
CommandCode cmdCode)
public RpcCommand(byte version,
byte type,
CommandCode cmdCode)
public void serialize()
throws SerializationException
serialize 在接口中 RemotingCommandExceptionSerializationExceptionpublic void deserialize()
throws DeserializationException
deserialize 在接口中 RemotingCommandExceptionDeserializationExceptionpublic 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 - CodecExceptionDeserializationExceptionpublic void serializeClazz()
throws SerializationException
public void deserializeClazz()
throws DeserializationException
public void serializeHeader(InvokeContext invokeContext) throws SerializationException
public void serializeContent(InvokeContext invokeContext) throws SerializationException
serializeContent 在接口中 RemotingCommandExceptionSerializationExceptionpublic void deserializeHeader(InvokeContext invokeContext) throws DeserializationException
public void deserializeContent(InvokeContext invokeContext) throws DeserializationException
deserializeContent 在接口中 RemotingCommandExceptionDeserializationExceptionpublic ProtocolCode getProtocolCode()
RemotingCommandgetProtocolCode 在接口中 RemotingCommandpublic CommandCode getCmdCode()
RemotingCommandgetCmdCode 在接口中 RemotingCommandpublic InvokeContext getInvokeContext()
RemotingCommandgetInvokeContext 在接口中 RemotingCommandpublic byte getSerializer()
RemotingCommandgetSerializer 在接口中 RemotingCommandpublic ProtocolSwitch getProtocolSwitch()
RemotingCommandgetProtocolSwitch 在接口中 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()
RemotingCommandgetId 在接口中 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)
Copyright © 2020. All rights reserved.