|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jqql.packets.BasicFamilyParser
public class BasicFamilyParser
basic protocol family parser 基本åè®®æ—è§£æžå™¨
Constructor Summary | |
---|---|
BasicFamilyParser()
|
Method Summary | |
---|---|
boolean |
accept(ByteBuffer buf)
judge parser whether can deal with this packet, judge can not touch buf pointer position åˆ¤æ–æ¤parser是å¦å¯ä»¥å¤„ç†è¿™ä¸ªåŒ…,判æ–ä¸èƒ½å½±å“到buf的指针ä½ç½® |
PacketHistory |
getHistory()
|
int |
getLength(ByteBuffer buf)
|
boolean |
isDuplicate(InPacket in)
checkout this input packet whether is duplicate 检查这个输入包是å¦é‡å¤ |
boolean |
isDuplicatedNeedReply(InPacket in)
|
InPacket |
parseIncoming(ByteBuffer buf,
int len,
QQUser user)
parse a input packet object from buf current position, complete pointer is after length 从buf当å‰ä½ç½®è§£æžå‡ºä¸€ä¸ªè¾“入包对象,解æžå®Œæ¯•åŽæŒ‡é’ˆä½äºŽlengthä¹‹åŽ |
OutPacket |
parseOutcoming(ByteBuffer buf,
int len,
QQUser user)
parse a output packet object from buf current position, complete pointer is after length 从buf当å‰ä½ç½®è§£æžå‡ºä¸€ä¸ªè¾“出包对象,解æžå®Œæ¯•åŽæŒ‡é’ˆä½äºŽlengthä¹‹åŽ |
int |
relocate(ByteBuffer buf)
suppose buff current position is a packet, return initial position of next packet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicFamilyParser()
Method Detail |
---|
public boolean accept(ByteBuffer buf)
IParser
accept
in interface IParser
buf
- ByteBuffer
public int getLength(ByteBuffer buf)
getLength
in interface IParser
buf
- TODO
public boolean isDuplicate(InPacket in)
IParser
isDuplicate
in interface IParser
public InPacket parseIncoming(ByteBuffer buf, int len, QQUser user) throws PacketParseException
IParser
parseIncoming
in interface IParser
buf
- ByteBufferlen
- packet length
包长度user
- QQ user object
QQ用户对象
PacketParseException
public OutPacket parseOutcoming(ByteBuffer buf, int len, QQUser user) throws PacketParseException
IParser
parseOutcoming
in interface IParser
buf
- ByteBufferlen
- packet length
包长度user
- QQ user object
QQ用户对象
PacketParseException
public boolean isDuplicatedNeedReply(InPacket in)
isDuplicatedNeedReply
in interface IParser
in
- received packet
收到的包
public int relocate(ByteBuffer buf)
IParser
relocate
in interface IParser
buf
- ByteBuffer
public PacketHistory getHistory()
getHistory
in interface IParser
|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |