|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFlapCommand
CloseFlapCmd
A FLAP command sent immediately before a FLAP connection is closed. Note that sending this is always optional, but always means the connection will close immediately. Normally, the server sends this command (possibly with a disconnection code), the client sends an empty one back, and the TCP connection terminates.
Field Summary | |
static int |
CHANNEL_CLOSE
The FLAP channel on which close commands reside. |
static int |
CODE_LOGGED_IN_ELSEWHERE
A disconnection code indicating that this screenname has been logged into elsewhere, and thus you have been disconnected. |
Constructor Summary | |
|
CloseFlapCmd()
Creates a new empty outgoing FLAP close command without a disconnection code or associated URL. |
protected |
CloseFlapCmd(FlapPacket packet)
Generates a new FLAP close command from the given incoming FLAP packet. |
|
CloseFlapCmd(int code)
Creates a new outgoing FLAP close command with the given disconnection code and no associated URL. |
|
CloseFlapCmd(int code,
java.lang.String url)
Creates a new outgoing FLAP close command with the given disconnection code and related URL. |
Method Summary | |
int |
getCode()
Returns the "disconnection code" sent in this close command, or -1 if none was sent. |
java.lang.String |
getUrl()
Returns the "error URL" at which a description or support for the given error can be found, or null if no such URL was sent. |
java.lang.String |
toString()
|
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, wait, wait, wait |
Field Detail |
public static final int CHANNEL_CLOSE
public static final int CODE_LOGGED_IN_ELSEWHERE
Constructor Detail |
protected CloseFlapCmd(FlapPacket packet)
packet
- an incoming FLAP close packetpublic CloseFlapCmd()
new FlapCloseCmd(-1, null)
.
public CloseFlapCmd(int code)
new FlapCloseCmd(code, null)
.
code
- a disconnection code, like CODE_LOGGED_IN_ELSEWHERE
,
or -1
to indicate that no code should be sentpublic CloseFlapCmd(int code, java.lang.String url)
code
- a disconnection code, like CODE_LOGGED_IN_ELSEWHERE
,
or -1
if no code should be senturl
- a (HTTP) URL where a description of this error can be found,
or null
if no URL should be sentMethod Detail |
public final int getCode()
-1
if none was sent. Normally CODE_LOGGED_IN_ELSEWHERE
or -1
.
-1
if none was sentpublic final java.lang.String getUrl()
null
if no such URL was sent. Note
that AOL's AIM servers only send http://www.aol.com
here.
null
if none was sentpublic 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 occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |