|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCommand
ConnCommand
MigrationNotice
A SNAC command sent to tell the client to "migrate" to another server.
0x01
, command 0x12
Field Summary |
Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
Constructor Summary | |
protected |
MigrationNotice(SnacPacket packet)
Creates a new migration notice command from the given incoming SNAC packet. |
|
MigrationNotice(java.lang.String host,
ByteBlock cookie,
int[] families)
Creates a new outgoing migration notice command with the given supported SNAC families, hostname, and login cookie for that host. |
Method Summary | |
ByteBlock |
getCookie()
Returns the login cookie to be used upon migrating (connecting) to the new server. |
int[] |
getFamilies()
Returns the SNAC families supported by the host to which the client should migrate, or null if all families on the current
connection are being migrated. |
java.lang.String |
getHost()
Returns the host to which the client should migrate. |
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 SnacCommand |
getCommand, getFamily, getFlag1, getFlag2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected MigrationNotice(SnacPacket packet)
packet
- an incoming migration notice packetpublic MigrationNotice(java.lang.String host, ByteBlock cookie, int[] families)
null
to indicate that all families on
the current connection are being migrated.
host
- the host to which the client should migratecookie
- a login cookie for the given hostfamilies
- a list of SNAC families supported by the given host, or
null
if all families supported by the current
connection are supportedMethod Detail |
public final java.lang.String getHost()
public final ByteBlock getCookie()
public final int[] getFamilies()
null
if all families on the current
connection are being migrated. If this is not null
, the
current connection should not be dropped, as some families are
still supported.
public void writeData(java.io.OutputStream out) throws java.io.IOException
SnacCommand
writeData
in class SnacCommand
out
- the stream to which to write the SNAC data
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |