📄 cmppcancel.java
字号:
import java.lang.*;
import java.net.*;
import java.io.*;
import CMPPCommandID;
import CMPPPacket;
public class CMPPCancel extends CMPPPacket
{
public int msg_id = 1;//消息标识
public CMPPCancel(int sequence_id)
{
super(CMPPCommandID.CMPP_CANCEL,sequence_id);
}
public CMPPCancel(CMPPPacket packet)
{
super(packet);
}
public boolean isValid()
{
if(command_id != CMPPCommandID.CMPP_CANCEL)
{
CMPPLog.log("CMPPCancel.isValid : not a CMPP_ACTIVETEST command !",
CMPPLog.LOG_CMPP_CANCEL | CMPPLog.LOG_ISVALID_METHOD);
return false;
}
if(msg_id <= 0)
{
CMPPLog.log("CMPPCancel.isValid : invalid msg_id !",
CMPPLog.LOG_CMPP_CANCEL | 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_CANCEL | lMethod);
}
public void wrap()
throws CMPPException
{
CMPPLog.log("CMPPCancel.wrap : wrap elements !",
CMPPLog.LOG_CMPP_CANCEL | CMPPLog.LOG_WRAP_METHOD);
dump(CMPPLog.LOG_WRAP_METHOD);
insertInteger(msg_id);
}
public void unwrap()
throws CMPPException
{
CMPPLog.log("CMPPCancel.unwrap : unwrap elements !",
CMPPLog.LOG_CMPP_CANCEL | CMPPLog.LOG_UNWRAP_METHOD);
msg_id = getInteger();
dump(CMPPLog.LOG_UNWRAP_METHOD);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -