|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSnacCommand
ConnCommand
ServiceRedirect
A SNAC command sent in response to a ServiceRequest to direct
the client to an OSCAR server that supports the specified SNAC family.
ServiceRequest0x01, command 0x05| Field Summary |
| Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
| Constructor Summary | |
|
ServiceRedirect(int family,
java.lang.String host,
ByteBlock cookie)
Creates a new outgoing service redirection command with the given properties and no port field. |
|
ServiceRedirect(int family,
java.lang.String host,
int port,
ByteBlock cookie)
Creates a new outgoing service redirection command with the given properties. |
protected |
ServiceRedirect(SnacPacket packet)
Creates a new service redirect command from the given incoming SNAC packet. |
| Method Summary | |
ByteBlock |
getCookie()
Returns the login cookie that should be FLAP provided upon connecting to the specified host. |
java.lang.String |
getRedirectHost()
Returns the host to which the client should connect for the given service. |
int |
getRedirectPort()
Returns the port on which the client should connect to the given host, or -1 if none was specified. |
int |
getSnacFamily()
Returns the SNAC family that is supported by the given host. |
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 ServiceRedirect(SnacPacket packet)
packet - the incoming service redirection packet
public ServiceRedirect(int family,
java.lang.String host,
ByteBlock cookie)
family - the SNAC family supported by the given serverhost - the hostname of the server to connect tocookie - a login cookie to provide to the given server upon
connecting
public ServiceRedirect(int family,
java.lang.String host,
int port,
ByteBlock cookie)
family - the SNAC family supported by the given serverhost - the hostname of the server to connect toport - the port on which to connect to the server, or
-1 for nonecookie - a login cookie to provide to the given server upon
connecting| Method Detail |
public final int getSnacFamily()
public final java.lang.String getRedirectHost()
public int getRedirectPort()
-1 if none was specified.
public final ByteBlock getCookie()
public void writeData(java.io.OutputStream out)
throws java.io.IOException
SnacCommand
writeData in class SnacCommandout - 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 | |||||||||