com.aspire.nm.component.cmppserver.filter.coder.packet
类 CmppConnectPacket

java.lang.Object
  继承者 com.aspire.nm.component.cmppserver.filter.coder.packet.Packet
      继承者 com.aspire.nm.component.cmppserver.filter.coder.packet.CmppPacket
          继承者 com.aspire.nm.component.cmppserver.filter.coder.packet.CmppConnectPacket
所有已实现的接口:
Serializable

public class CmppConnectPacket
extends CmppPacket

CMPP_CONNECT

参照:中国移动通信互联网短信网关接口协议CMPP3.0, 中国移动通信互联网短信网关接口协议CMPP2.0

从以下版本开始:
1.0.0
作者:
Wang Shenggong
另请参见:
序列化表格

字段摘要
 
从类 com.aspire.nm.component.cmppserver.filter.coder.packet.CmppPacket 继承的字段
bizParams, CMPP_ACTIVE_TEST, CMPP_ACTIVE_TEST_LENGTH, CMPP_ACTIVE_TEST_RESP, CMPP_ACTIVE_TEST_RESP_LENGTH, CMPP_CANCEL, CMPP_CANCEL_LENGTH_V30, CMPP_CANCEL_RESP, CMPP_CANCEL_RESP_LENGTH_V30, CMPP_CONNECT, CMPP_CONNECT_LENGTH, CMPP_CONNECT_RESP, CMPP_CONNECT_RESP_LENGTH_V20, CMPP_CONNECT_RESP_LENGTH_V30, CMPP_DELIVER, CMPP_DELIVER_LENGTH_MIN_V20, CMPP_DELIVER_LENGTH_MIN_V30, CMPP_DELIVER_RESP, CMPP_DELIVER_RESP_LENGTH_V20, CMPP_DELIVER_RESP_LENGTH_V30, CMPP_QUERY, CMPP_QUERY_LENGTH_V30, CMPP_QUERY_RESP, CMPP_QUERY_RESP_LENGTH_V30, CMPP_SUBMIT, CMPP_SUBMIT_LENGTH_MIN_V20, CMPP_SUBMIT_LENGTH_MIN_V30, CMPP_SUBMIT_RESP, CMPP_SUBMIT_RESP_LENGTH_V20, CMPP_SUBMIT_RESP_LENGTH_V30, CMPP_TERMINATE, CMPP_TERMINATE_LENGTH, CMPP_TERMINATE_RESP, CMPP_TERMINATE_RESP_LENGTH, commandId, HEADER_LENGTH, sequenceId, totalLength, UNKNOW_PACKET, USMP_PUSHNOTIFY, USMP_PUSHNOTIRY_LENGTH, USMP_PUSHNOTIRY_RESP, USMP_PUSHNOTIRY_RESP_LENGTH, USMP_SUBMITPUSH, USMP_SUBMITPUSH_LENGTH_MAX, USMP_SUBMITPUSH_LENGTH_MIN, USMP_SUBMITPUSH_RESP, USMP_SUBMITPUSH_RESP_LENGTH, version
 
构造方法摘要
CmppConnectPacket()
           
CmppConnectPacket(Version version)
          构造CMPP_CONNECT包
 
方法摘要
 byte[] getAuthenticatorSource()
           
 String getAuthenticatorSourceHexString()
          取得authenticatorSource的十六进制字符串
 String getSourceAddr()
           
 int getTimestamp()
           
 int getVer()
           
 Version getVersion()
          取得连接使用的协议版本信息
 byte[] pack()
          封包, 将封包对象打包成网络传输的字节数组
 void setAuthenticatorSource(byte[] authenticatorSource)
           
 void setSourceAddr(String sourceAddr)
          设置源地址
 void setTimestamp(int timestamp)
           
 void setVer(int ver)
           
 String toString()
           
 CmppPacket unpack(ByteBuffer buffer)
          将底层字节数组解包成封包对象, 解包后对象本身相应的值发生改变被将自己返回
 
从类 com.aspire.nm.component.cmppserver.filter.coder.packet.CmppPacket 继承的方法
getCommandId, getSequenceId, getTotalLength, isValidHeader, setCommandId, setSequenceId, setTotalLength, setVersion
 
从类 com.aspire.nm.component.cmppserver.filter.coder.packet.Packet 继承的方法
allocate, get, get, get, get, getByteBuffer, getBytes, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getString, put, put, put, put, put, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, putString, putString, putStringLeftPad, putStringRightPad, setByteBuffer, setBytes
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

CmppConnectPacket

public CmppConnectPacket()

CmppConnectPacket

public CmppConnectPacket(Version version)
构造CMPP_CONNECT包

方法详细信息

pack

public byte[] pack()
            throws PacketException
从类 CmppPacket 复制的描述
封包, 将封包对象打包成网络传输的字节数组

覆盖:
CmppPacket 中的 pack
返回:
打包后的字节数组
抛出:
PacketException

unpack

public CmppPacket unpack(ByteBuffer buffer)
                  throws PacketException
从类 CmppPacket 复制的描述
将底层字节数组解包成封包对象, 解包后对象本身相应的值发生改变被将自己返回

覆盖:
CmppPacket 中的 unpack
返回:
解包后的CmppPacket对象
抛出:
PacketException

getSourceAddr

public String getSourceAddr()
返回:
源地址

setSourceAddr

public void setSourceAddr(String sourceAddr)
设置源地址

参数:
sourceAddr - the sourceAddr to set

getAuthenticatorSource

public byte[] getAuthenticatorSource()
返回:
the authenticatorSource

setAuthenticatorSource

public void setAuthenticatorSource(byte[] authenticatorSource)
参数:
authenticatorSource - the authenticatorSource to set

getTimestamp

public int getTimestamp()
返回:
the timestamp

setTimestamp

public void setTimestamp(int timestamp)
参数:
timestamp - the timestamp to set

getAuthenticatorSourceHexString

public String getAuthenticatorSourceHexString()
取得authenticatorSource的十六进制字符串

返回:
authenticatorSource

getVersion

public Version getVersion()
取得连接使用的协议版本信息

返回:

getVer

public int getVer()

setVer

public void setVer(int ver)

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2016. All rights reserved.