|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.aspire.nm.component.cmppserver.filter.coder.packet.Packet
com.aspire.nm.component.cmppserver.filter.coder.packet.CmppPacket
public abstract class CmppPacket
CMPP协议封包
| 构造方法摘要 | |
|---|---|
CmppPacket()
构造CMPP封包 |
|
CmppPacket(Version version)
用CMPP版本号初始化Cmpp封包 |
|
| 方法摘要 | |
|---|---|
int |
getCommandId()
|
int |
getSequenceId()
|
int |
getTotalLength()
|
protected boolean |
isValidHeader()
判断消息头是否为合法的CMPP消息头 |
byte[] |
pack()
封包, 将封包对象打包成网络传输的字节数组 |
void |
setCommandId(int commandId)
|
void |
setSequenceId(int sequenceId)
|
void |
setTotalLength(int totalLength)
|
void |
setVersion(Version version)
|
CmppPacket |
unpack(ByteBuffer buffer)
将底层字节数组解包成封包对象, 解包后对象本身相应的值发生改变被将自己返回 |
| 从类 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, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public Object bizParams
public static final int CMPP_CONNECT
public static final int CMPP_CONNECT_LENGTH
public static final int CMPP_CONNECT_RESP
public static final int CMPP_CONNECT_RESP_LENGTH_V30
public static final int CMPP_CONNECT_RESP_LENGTH_V20
public static final int CMPP_TERMINATE
public static final int CMPP_TERMINATE_LENGTH
public static final int CMPP_TERMINATE_RESP
public static final int CMPP_TERMINATE_RESP_LENGTH
public static final int CMPP_SUBMIT
public static final int CMPP_SUBMIT_LENGTH_MIN_V30
public static final int CMPP_SUBMIT_LENGTH_MIN_V20
public static final int CMPP_SUBMIT_RESP
public static final int CMPP_SUBMIT_RESP_LENGTH_V30
public static final int CMPP_SUBMIT_RESP_LENGTH_V20
public static final int CMPP_DELIVER
public static final int CMPP_DELIVER_LENGTH_MIN_V30
public static final int CMPP_DELIVER_LENGTH_MIN_V20
public static final int CMPP_DELIVER_RESP
public static final int CMPP_DELIVER_RESP_LENGTH_V30
public static final int CMPP_DELIVER_RESP_LENGTH_V20
public static final int CMPP_QUERY
public static final int CMPP_QUERY_LENGTH_V30
public static final int CMPP_QUERY_RESP
public static final int CMPP_QUERY_RESP_LENGTH_V30
public static final int CMPP_CANCEL
public static final int CMPP_CANCEL_LENGTH_V30
public static final int CMPP_CANCEL_RESP
public static final int CMPP_CANCEL_RESP_LENGTH_V30
public static final int CMPP_ACTIVE_TEST
public static final int CMPP_ACTIVE_TEST_LENGTH
public static final int CMPP_ACTIVE_TEST_RESP
public static final int CMPP_ACTIVE_TEST_RESP_LENGTH
public static final int USMP_SUBMITPUSH
public static final int USMP_SUBMITPUSH_LENGTH_MIN
public static final int USMP_SUBMITPUSH_LENGTH_MAX
public static final int USMP_SUBMITPUSH_RESP
public static final int USMP_SUBMITPUSH_RESP_LENGTH
public static final int USMP_PUSHNOTIFY
public static final int USMP_PUSHNOTIRY_LENGTH
public static final int USMP_PUSHNOTIRY_RESP
public static final int USMP_PUSHNOTIRY_RESP_LENGTH
public static final int HEADER_LENGTH
protected Version version
protected int commandId
protected int sequenceId
protected int totalLength
public static CmppPacket UNKNOW_PACKET
| 构造方法详细信息 |
|---|
public CmppPacket()
public CmppPacket(Version version)
version - | 方法详细信息 |
|---|
protected boolean isValidHeader()
commandId -
public byte[] pack()
throws PacketException
PacketException
public CmppPacket unpack(ByteBuffer buffer)
throws PacketException
bytes - 字节数组
PacketExceptionpublic int getCommandId()
public void setCommandId(int commandId)
commandId - the commandId to setpublic int getSequenceId()
public void setSequenceId(int sequenceId)
sequenceId - the sequenceId to setpublic int getTotalLength()
public void setTotalLength(int totalLength)
totalLength - the totalLength to setpublic void setVersion(Version version)
version -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||