|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFlapCommand
LoginFlapCmd
A command sent to identify oneself on a new FLAP connection with a FLAP protocol version and, optionally, a "login cookie" provided by another OSCAR server. This is always the first packet sent and received on a FLAP connection.
Field Summary | |
static int |
CHANNEL_LOGIN
The FLAP channel on which this command resides. |
static long |
VERSION_DEFAULT
I guess this is the FLAP protocol version joscar implements; this is what should be sent in a FLAP version command. |
Constructor Summary | |
LoginFlapCmd()
Creates a LoginCookieCmd with the default FLAP version and no login cookie. |
|
LoginFlapCmd(ByteBlock cookie)
Creates a LoginCookieCmd with the default FLAP version and the given login cookie. |
|
LoginFlapCmd(FlapPacket packet)
Generates a LoginCookieCmd from the given packet. |
|
LoginFlapCmd(long version)
Creates a LoginCookieCmd with the given FLAP version and
no login cookie. |
|
LoginFlapCmd(long version,
ByteBlock cookie)
Creates a new LoginCookieCmd with the given FLAP protocol
version and with the given cookie. |
Method Summary | |
ByteBlock |
getCookie()
Returns the login cookie associated with this command. |
long |
getVersion()
Returns the FLAP protocol version declared in this command. |
void |
writeData(java.io.OutputStream out)
Writes this command's FLAP data to the given stream. |
Methods inherited from class FlapCommand |
getChannel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CHANNEL_LOGIN
public static final long VERSION_DEFAULT
1
is the only
publically known FLAP protocol version.
Constructor Detail |
public LoginFlapCmd(FlapPacket packet)
LoginCookieCmd
from the given packet.
packet
- the packet from which this object should be generatedpublic LoginFlapCmd()
LoginCookieCmd
with the default FLAP version and no login cookie.
public LoginFlapCmd(long version)
LoginCookieCmd
with the given FLAP version and
no login cookie. This constructor is useful for server developers because
no login cookie is ever sent by the server; also, no login cookie is sent
by the client or the server upon initial connection to the login ("auth")
server.
version
- the FLAP protocol version in use on the FLAP connection on
which this command will be sentpublic LoginFlapCmd(ByteBlock cookie)
LoginCookieCmd
with the default FLAP version and the given login cookie.
cookie
- the login cookie for the connection on which this command
will be sentpublic LoginFlapCmd(long version, ByteBlock cookie)
LoginCookieCmd
with the given FLAP protocol
version and with the given cookie.
version
- the FLAP protocol version in usecookie
- a login "cookie" provided by another OSCAR connectionMethod Detail |
public final long getVersion()
public final ByteBlock getCookie()
public void writeData(java.io.OutputStream out) throws java.io.IOException
FlapCommand
writeData
in class FlapCommand
out
- the stream to which the FLAP data should be written
java.io.IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |