JML

net.sf.jqql.packets.out
Class ClusterCommandPacket

java.lang.Object
  extended by net.sf.jqql.packets.Packet
      extended by net.sf.jqql.packets.OutPacket
          extended by net.sf.jqql.packets.BasicOutPacket
              extended by net.sf.jqql.packets.out.ClusterCommandPacket
Direct Known Subclasses:
ClusterActivatePacket, ClusterActivateTempPacket, ClusterAuthPacket, ClusterCommitMemberOrganizationPacket, ClusterCommitOrganizationPacket, ClusterCreatePacket, ClusterCreateTempPacket, ClusterDismissPacket, ClusterExitPacket, ClusterExitTempPacket, ClusterGetCardBatchPacket, ClusterGetCardPacket, ClusterGetInfoPacket, ClusterGetMemberInfoPacket, ClusterGetOnlineMemberPacket, ClusterGetTempInfoPacket, ClusterJoinPacket, ClusterModifyCardPacket, ClusterModifyInfoPacket, ClusterModifyMemberPacket, ClusterModifyTempInfoPacket, ClusterModifyTempMemberPacket, ClusterSearchPacket, ClusterSendIMExPacket, ClusterSetRolePacket, ClusterSubClusterOpPacket, ClusterTransferRolePacket, ClusterUpdateOrganizationPacket

public class ClusterCommandPacket
extends BasicOutPacket

 base class of cluster operation packet, containing  some common field  of cluster operation packet, like subcommand type. 
 群操作包的基类,其包含了一些群操作包的公共字段,比如子命令类型
 

Author:
luma

Field Summary
protected static byte BOLD
           
protected  int clusterId
           
protected static byte ITALIC
           
protected static byte NONE
          字体属性
protected  byte subCommand
           
protected static byte UNDERLINE
           
 
Fields inherited from class net.sf.jqql.packets.OutPacket
ack, key, resendCountDown, sendCount, seq, timeout
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
ClusterCommandPacket(ByteBuffer buf, int length, QQUser user)
           
ClusterCommandPacket(QQUser user)
          constructor 构造函数
 
Method Summary
 int getClusterId()
           
 String getPacketName()
           
 byte getSubCommand()
           
protected  void parseBody(ByteBuffer buf)
          parse packet body, from begin position of buf 解析包体,从buf的开头位置解析起
protected  void putBody(ByteBuffer buf)
          initialize packet body 初始化包体
 void setClusterId(int clusterId)
           
 void setSubCommand(byte subCommand)
           
 
Methods inherited from class net.sf.jqql.packets.BasicOutPacket
decryptBody, encryptBody, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getTailLength, parseHeader, parseTail, postFill, putHead, putTail, toString, validateHeader
 
Methods inherited from class net.sf.jqql.packets.OutPacket
dump, fill, getKey, getNextSeq, getSendCount, getTimeout, needAck, needResend, setKey, setSendCount, setTimeout
 
Methods inherited from class net.sf.jqql.packets.Packet
equals, getCommand, getHeader, getSequence, getSource, hash, hashCode, isDuplicated, setDuplicated, setHeader, setSequence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

subCommand

protected byte subCommand

clusterId

protected int clusterId

NONE

protected static final byte NONE
字体属性

See Also:
Constant Field Values

BOLD

protected static final byte BOLD
See Also:
Constant Field Values

ITALIC

protected static final byte ITALIC
See Also:
Constant Field Values

UNDERLINE

protected static final byte UNDERLINE
See Also:
Constant Field Values
Constructor Detail

ClusterCommandPacket

public ClusterCommandPacket(QQUser user)
constructor 构造函数


ClusterCommandPacket

public ClusterCommandPacket(ByteBuffer buf,
                            int length,
                            QQUser user)
                     throws PacketParseException
Parameters:
buf -
length -
Throws:
PacketParseException
Method Detail

parseBody

protected void parseBody(ByteBuffer buf)
                  throws PacketParseException
Description copied from class: Packet
parse packet body, from begin position of buf 解析包体,从buf的开头位置解析起

Overrides:
parseBody in class OutPacket
Parameters:
buf - ByteBuffer
Throws:
PacketParseException - if parse error 如果解析出错

getPacketName

public String getPacketName()
Overrides:
getPacketName in class BasicOutPacket
Returns:
descriptive name of packet 包的描述性名称

getSubCommand

public byte getSubCommand()
Returns:
Returns the subCommand.

setSubCommand

public void setSubCommand(byte subCommand)
Parameters:
subCommand - The subCommand to set.

getClusterId

public int getClusterId()
Returns:
Returns the clusterId.

setClusterId

public void setClusterId(int clusterId)
Parameters:
clusterId - The clusterId to set.

putBody

protected void putBody(ByteBuffer buf)
Description copied from class: Packet
initialize packet body 初始化包体

Specified by:
putBody in class Packet
Parameters:
buf - ByteBuffer

JML