public class RemotingCommand extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
RemotingVersionKey |
static String |
SERIALIZE_TYPE_ENV |
static String |
SERIALIZE_TYPE_PROPERTY |
| 限定符 | 构造器和说明 |
|---|---|
protected |
RemotingCommand() |
public static String RemotingVersionKey
public static RemotingCommand createRequestCommand(int code, CommandCustomHeader customHeader)
public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader)
public static RemotingCommand createResponseCommand(int code, String remark, Class<? extends CommandCustomHeader> classHeader)
public void markResponseType()
public static RemotingCommand createResponseCommand(int code, String remark)
public static RemotingCommand decode(byte[] array)
public static RemotingCommand decode(ByteBuffer byteBuffer)
public static int getHeaderLength(int length)
public static SerializeType getProtocolType(int source)
public static int createNewRequestId()
public static SerializeType getSerializeTypeConfigInThisServer()
public CommandCustomHeader readCustomHeader()
public void writeCustomHeader(CommandCustomHeader customHeader)
public CommandCustomHeader decodeCommandCustomHeader(Class<? extends CommandCustomHeader> classHeader) throws RemotingCommandException
public ByteBuffer encode()
public static byte[] markProtocolType(int source,
SerializeType type)
public void makeCustomHeaderToNet()
public ByteBuffer encodeHeader()
public ByteBuffer encodeHeader(int bodyLength)
public void markOnewayRPC()
public boolean isOnewayRPC()
public int getCode()
public void setCode(int code)
public RemotingCommandType getType()
public boolean isResponseType()
public LanguageCode getLanguage()
public void setLanguage(LanguageCode language)
public int getVersion()
public void setVersion(int version)
public int getOpaque()
public void setOpaque(int opaque)
public int getFlag()
public void setFlag(int flag)
public String getRemark()
public void setRemark(String remark)
public byte[] getBody()
public void setBody(byte[] body)
public SerializeType getSerializeTypeCurrentRPC()
public void setSerializeTypeCurrentRPC(SerializeType serializeTypeCurrentRPC)
Copyright © 2012–2016. All rights reserved.