📄 cmppdeliverresponse.java
字号:
import java.lang.*;
import java.net.*;
import java.io.*;
import CMPPCommandID;
import CMPPPacket;
import CMPPSubmitResponse;
public class CMPPDeliverResponse extends CMPPPacket
{
public int msg_id = 1;//消息标识
public byte result = 0;//结果
public CMPPDeliverResponse(int sequence_id)
{
super(CMPPCommandID.CMPP_DELIVER_RESPONSE,sequence_id);
}
public CMPPDeliverResponse(CMPPPacket packet)
{
super(packet);
}
public boolean isValid()
{
if(command_id != CMPPCommandID.CMPP_DELIVER_RESPONSE)
{
CMPPLog.log("CMPPDeliverResponse.isValid : not a CMPP_DELIVER_RESPONSE command !",
CMPPLog.LOG_CMPP_DELIVER_RESPONSE | CMPPLog.LOG_ISVALID_METHOD);
return false;
}
if(msg_id <= 0)
{
CMPPLog.log("CMPPDeliverResponse.isValid : invalid msg_id !",
CMPPLog.LOG_CMPP_DELIVER_RESPONSE | CMPPLog.LOG_ISVALID_METHOD);
return false;
}
return true;
}
public void dump(long lMethod)
{
CMPPLog.log("\tmsg_id = 0x" + CMPPUtility.toHexString(msg_id),
CMPPLog.LOG_CMPP_DELIVER_RESPONSE | lMethod);
CMPPLog.log("\tresult = " + result
+ " [" + CMPPUtility.getResultDescription(result) + "]",
CMPPLog.LOG_CMPP_DELIVER_RESPONSE | lMethod);
}
public void wrap()
throws CMPPException
{
CMPPLog.log("CMPPDeliverResponse.wrap : wrap elements !",
CMPPLog.LOG_CMPP_DELIVER_RESPONSE | CMPPLog.LOG_WRAP_METHOD);
dump(CMPPLog.LOG_WRAP_METHOD);
insertByte(result);
insertInteger(msg_id);
}
public void unwrap()
throws CMPPException
{
CMPPLog.log("CMPPDeliverResponse.unwrap : unwrap elements !",
CMPPLog.LOG_CMPP_DELIVER_RESPONSE | CMPPLog.LOG_UNWRAP_METHOD);
msg_id = getInteger();
result = getByte();
dump(CMPPLog.LOG_UNWRAP_METHOD);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -