net.kano.joscar.snaccmd.conn
Class FamilyVersionsCmd
java.lang.Object
SnacCommand
ConnCommand
FamilyVersionsCmd
- Direct Known Subclasses:
- ClientVersionsCmd, ServerVersionsCmd
- public abstract class FamilyVersionsCmd
- extends ConnCommand
A base class for the two SNAC-family-version-based commands in this family.
These two commands are ClientVersionsCmd and ServerVersionsCmd. Note that ClientReadyCmd involves client
versions as well, but sends more details about family versions than the two
version-only commands mentioned above.
| Fields inherited from class ConnCommand |
CMD_CLIENT_READY, CMD_CLIENT_VERS, CMD_ENCINFOACK, CMD_EXTRA_ACK, CMD_MIGRATE_PLS, CMD_MY_INFO_REQ, CMD_NOOP, CMD_PAUSE, CMD_PAUSE_ACK, CMD_RATE_ACK, CMD_RATE_CHG, CMD_RATE_INFO, CMD_RATE_REQ, CMD_RESUME, CMD_SERV_VERS, CMD_SERVER_READY, CMD_SERVICE_REDIR, CMD_SERVICE_REQ, CMD_SET_IDLE, CMD_SETENCINFO, CMD_SETEXTRAINFO, CMD_UPDATE, CMD_WARNED, CMD_YOUR_INFO, FAMILY_CONN, FAMILY_INFO |
|
Constructor Summary |
protected |
FamilyVersionsCmd(int command,
SnacFamilyInfo[] families)
Creates a new outgoing family-version-based command with the given SNAC
command type and the given list of family version information blocks. |
protected |
FamilyVersionsCmd(int command,
SnacPacket packet)
Creates a new family-version-based command read from the given incoming
SNAC packet. |
|
Method Summary |
SnacFamilyInfo[] |
getSnacFamilyInfos()
Returns the SNAC family information blocks contained in this command. |
java.lang.String |
toString()
|
void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FamilyVersionsCmd
protected FamilyVersionsCmd(int command,
SnacPacket packet)
- Creates a new family-version-based command read from the given incoming
SNAC packet.
- Parameters:
command - the SNAC command subtype of this commandpacket - a family-version-based-command SNAC packet
FamilyVersionsCmd
protected FamilyVersionsCmd(int command,
SnacFamilyInfo[] families)
- Creates a new outgoing family-version-based command with the given SNAC
command type and the given list of family version information blocks.
- Parameters:
command - the SNAC command subtype of this commandfamilies - a list of SNAC family version information blocks
getSnacFamilyInfos
public final SnacFamilyInfo[] getSnacFamilyInfos()
- Returns the SNAC family information blocks contained in this command.
- Returns:
- this command's list of SNAC family information blocks
writeData
public void writeData(java.io.OutputStream out)
throws java.io.IOException
- Description copied from class:
SnacCommand
- Writes this command's SNAC data block to the given stream. The SNAC data
block is the data after the first ten bytes of a SNAC packet.
- Specified by:
writeData in class SnacCommand
- Parameters:
out - the stream to which to write the SNAC data
- Throws:
java.io.IOException - if an I/O error occurs
toString
public java.lang.String toString()