public class RemotingCommand extends Object
Modifier | Constructor and Description |
---|---|
protected |
RemotingCommand() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkCommandBody()
检查commandBody
|
static RemotingCommand |
createRequestCommand(int code,
CommandBody body) |
static RemotingCommand |
createResponseCommand(int code,
CommandBody body) |
static RemotingCommand |
createResponseCommand(int code,
String remark) |
static RemotingCommand |
createResponseCommand(int code,
String remark,
CommandBody body) |
static RemotingCommand |
decode(byte[] array) |
static RemotingCommand |
decode(ByteBuffer byteBuffer) |
ByteBuffer |
encode() |
<T> T |
getBody() |
int |
getCode() |
int |
getFlag() |
int |
getOpaque() |
String |
getRemark() |
int |
getSubCode() |
RemotingCommandType |
getType() |
int |
getVersion() |
boolean |
isOnewayRPC() |
boolean |
isResponseType() |
void |
markOnewayRPC() |
void |
markResponseType() |
void |
setCode(int code) |
void |
setFlag(int flag) |
void |
setOpaque(int opaque) |
void |
setRemark(String remark) |
void |
setSubCode(int subCode) |
void |
setVersion(int version) |
String |
toString() |
public static RemotingCommand createRequestCommand(int code, CommandBody body)
public static RemotingCommand createResponseCommand(int code, String remark)
public static RemotingCommand createResponseCommand(int code, String remark, CommandBody body)
public static RemotingCommand createResponseCommand(int code, CommandBody body)
public static RemotingCommand decode(byte[] array)
public static RemotingCommand decode(ByteBuffer byteBuffer)
public <T> T getBody()
public boolean checkCommandBody() throws RemotingCommandFieldCheckException
RemotingCommandFieldCheckException
public ByteBuffer encode() throws RemotingCommandException
RemotingCommandException
public void markResponseType()
public boolean isResponseType()
public void markOnewayRPC()
public boolean isOnewayRPC()
public int getCode()
public void setCode(int code)
public RemotingCommandType getType()
public int getVersion()
public void setVersion(int version)
public int getOpaque()
public void setOpaque(int opaque)
public int getFlag()
public int getSubCode()
public void setSubCode(int subCode)
public void setFlag(int flag)
public String getRemark()
public void setRemark(String remark)
Copyright © 2014. All Rights Reserved.