⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmppcancel.java

📁 短信网关发送接受平台。
💻 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 + -