net.kano.joscar.snaccmd.acct
Class ConfirmAck

java.lang.Object
  extended bySnacCommand
      extended byAcctCommand
          extended byConfirmAck

public class ConfirmAck
extends AcctCommand

A command sent in response to an ConfirmAcctCmd.

See Also:
ConfirmAcctCmd
Source of this SNAC:
AIM server
SNAC command type:
Family 0x07, command 0x07

Field Summary
static int RESULT_ALREADY_CONFIRMED
          A result code indicating that a confirmation email is not necessary because this screen name has already been confirmed.
static int RESULT_SUCCESS
          A result code indicating that the confirmation request succeeded and a confirmation email has been sent to this screenname's registered email address.
static int RESULT_UNAVAILABLE
          A result code indicating that confirmation is currently unavailable for some reason or other.
 
Fields inherited from class AcctCommand
CMD_ACCT_MOD, CMD_CONFIRM, CMD_CONFIRM_ACK, CMD_INFO_REQ, CMD_INFO_RESP, CMD_MOD_ACK, FAMILY_ACCT, FAMILY_INFO
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  ConfirmAck(int result)
          Creates a new outgoing confirmation request response with the given result code and no error URL.
  ConfirmAck(int result, java.lang.String errorURL)
          Creates a new outgoing confirmation request error response with the given result code and error URL.
protected ConfirmAck(SnacPacket packet)
          Generates a confirmation request response from the given incoming SNAC packet.
 
Method Summary
 java.lang.String getErrorUrl()
          A URL describing any error that occurred.
 int getResult()
          Returns this response's result code.
 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
 

Field Detail

RESULT_SUCCESS

public static final int RESULT_SUCCESS
A result code indicating that the confirmation request succeeded and a confirmation email has been sent to this screenname's registered email address.

See Also:
Constant Field Values

RESULT_UNAVAILABLE

public static final int RESULT_UNAVAILABLE
A result code indicating that confirmation is currently unavailable for some reason or other.

See Also:
Constant Field Values

RESULT_ALREADY_CONFIRMED

public static final int RESULT_ALREADY_CONFIRMED
A result code indicating that a confirmation email is not necessary because this screen name has already been confirmed.

See Also:
Constant Field Values
Constructor Detail

ConfirmAck

protected ConfirmAck(SnacPacket packet)
Generates a confirmation request response from the given incoming SNAC packet.

Parameters:
packet - a confirmation request response SNAC packet

ConfirmAck

public ConfirmAck(int result)
Creates a new outgoing confirmation request response with the given result code and no error URL.

Parameters:
result - a result code

ConfirmAck

public ConfirmAck(int result,
                  java.lang.String errorURL)
Creates a new outgoing confirmation request error response with the given result code and error URL.

Parameters:
result - this response's result code, like RESULT_SUCCESS
errorURL - a URL explaining an error that occurred
Method Detail

getResult

public final int getResult()
Returns this response's result code. Generally one of RESULT_SUCCESS, RESULT_UNAVAILABLE, and RESULT_ALREADY_CONFIRMED.

Returns:
the result code associated with this response

getErrorUrl

public final java.lang.String getErrorUrl()
A URL describing any error that occurred. Generally only sent when the result code is not RESULT_SUCCESS.

Returns:
this response's error URL

writeData

public void writeData(java.io.OutputStream out)
               throws java.io.IOException
Description copied from class: SnacCommand
Writes this command's SNAC data block to the given stream. The SNAC data block is the data after the first ten bytes of a SNAC packet.

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

toString

public java.lang.String toString()