|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectRvProxyPacket
A data structure used to send and receive commands to and from an AOL Proxy Server.
RvProxyCmd,
RvProxyCmdFactory| Field Summary | |
static int |
CMDTYPE_ACK
A command type for an acknowledgement packet. |
static int |
CMDTYPE_ERROR
A command type for error commands. |
static int |
CMDTYPE_INIT_RECV
A command type for the first command sent to the server when "receiving" a connection over an AOL Proxy Server. |
static int |
CMDTYPE_INIT_SEND
A command type for the first command sent to the server when creating a connection over an AOL Proxy Server. |
static int |
CMDTYPE_READY
A command type for a command indicating that the proxy initialization process has finished. |
static int |
FLAGS_DEFAULT_FROM_CLIENT
The set of flags normally sent by a client connected to an AOL Proxy Server. |
static int |
FLAGS_DEFAULT_FROM_SERVER
The set of flags normally sent by the AOL Proxy Server. |
static int |
PACKETVERSION_DEFAULT
A packet version code used by WinAIM by default . |
| Constructor Summary | |
protected |
RvProxyPacket(int packetVersion,
int cmdType,
int flags,
ByteBlock data,
int totalSize)
Creates a new AOL Proxy Server packet with the given properties. |
|
RvProxyPacket(RvProxyCmd rvProxyCmd)
Creates a new outgoing AOL Proxy Server packet. |
| Method Summary | |
ByteBlock |
getCommandData()
Returns the "command-specific" data sent in this packet. |
int |
getCommandType()
Returns this packet's command type. |
int |
getFlags()
Returns the bit flags sent in this packet. |
int |
getPacketVersion()
Returns the "packet version" for this packet. |
int |
getTotalSize()
Returns the total size of this packet, in bytes, as read from an incoming stream. |
static RvProxyPacket |
readPacket(java.io.InputStream in)
Reads an AOL Proxy Server packet from the given stream. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int PACKETVERSION_DEFAULT
public static final int CMDTYPE_ERROR
public static final int CMDTYPE_INIT_SEND
public static final int CMDTYPE_INIT_RECV
public static final int CMDTYPE_ACK
public static final int CMDTYPE_READY
public static final int FLAGS_DEFAULT_FROM_SERVER
public static final int FLAGS_DEFAULT_FROM_CLIENT
| Constructor Detail |
protected RvProxyPacket(int packetVersion,
int cmdType,
int flags,
ByteBlock data,
int totalSize)
packetVersion - the "version" code of the packetcmdType - this packet's command type codeflags - the set of bit flags sent in this packetdata - a block of command-specific data in this packettotalSize - the total size of this packet, as read from an incoming
block of binary datapublic RvProxyPacket(RvProxyCmd rvProxyCmd)
rvProxyCmd - an RvProxyCmd whose properties will be
used for this packet| Method Detail |
public static RvProxyPacket readPacket(java.io.InputStream in)
throws java.io.IOException
IOException is thrown). Note that if a complete,
valid packet cannot be read, null is returned.
null, no guarantees can be made
about the contents and state of the given stream; part of a packet may or
may not have been read. In general, the right thing to do after this
method returns null is to close the underlying stream.
in - the stream from which to read an RV proxy packet
RvProxyPacket read from the given stream, or
null if no valid packet could be read
java.io.IOExceptionpublic final int getPacketVersion()
PACKETVERSION_DEFAULT.
public final int getCommandType()
CMDTYPE_*
constants defined in this class.
public final int getFlags()
FLAGS_DEFAULT_FROM_CLIENT or FLAGS_DEFAULT_FROM_SERVER.
public final ByteBlock getCommandData()
null if this packet was not read from an
incoming stream but was instead created manually.
public final int getTotalSize()
-1 if this packet was
not read from an incoming stream (via readPacket(java.io.InputStream)).
-1 if
this packet was not read from an incoming stream
public void write(java.io.OutputStream out)
throws java.io.IOException
LiveWritable
write in interface LiveWritableout - the stream to which to write
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 | |||||||||