net.kano.joscar.rvproto.rvproxy
Class RvProxyErrorCmd

java.lang.Object
  extended byRvProxyCmd
      extended byRvProxyErrorCmd

public class RvProxyErrorCmd
extends RvProxyCmd

An RV Proxy command used to indicate that some part of initializing a connection failed.

Source of this RV Proxy command:
AOL Proxy Server

Field Summary
static int ERRORCODE_TIMEOUT
          An error code sent upon connecting to an AOL Proxy Server and not sending any initialization commands.
 
Constructor Summary
  RvProxyErrorCmd(int errorCode)
          Creates a new outgoing RV Proxy error command with the given error code.
protected RvProxyErrorCmd(RvProxyPacket header)
          Creates a new RV Proxy error command from the given incoming error packet.
 
Method Summary
 int getErrorCode()
          Returns the error code sent in this command.
 java.lang.String toString()
           
 void writeCommandData(java.io.OutputStream out)
          Writes this command's raw "command-specific data" to the given stream.
 
Methods inherited from class RvProxyCmd
getCommandType, getFlags, getPacketVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERRORCODE_TIMEOUT

public static final int ERRORCODE_TIMEOUT
An error code sent upon connecting to an AOL Proxy Server and not sending any initialization commands. It can be assumed that this error code indicates that a connection has "timed out" waiting for data.

See Also:
Constant Field Values
Constructor Detail

RvProxyErrorCmd

protected RvProxyErrorCmd(RvProxyPacket header)
Creates a new RV Proxy error command from the given incoming error packet.

Parameters:
header - an incoming RV Proxy error packet

RvProxyErrorCmd

public RvProxyErrorCmd(int errorCode)
Creates a new outgoing RV Proxy error command with the given error code.

Parameters:
errorCode - an error code, like ERRORCODE_TIMEOUT
Method Detail

getErrorCode

public final int getErrorCode()
Returns the error code sent in this command. As of this writing the only error code on record is ERRORCODE_TIMEOUT.

Returns:
this command's error code

writeCommandData

public void writeCommandData(java.io.OutputStream out)
                      throws java.io.IOException
Description copied from class: RvProxyCmd
Writes this command's raw "command-specific data" to the given stream.

Specified by:
writeCommandData in class RvProxyCmd
Parameters:
out - the stream to which to write
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()