|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSnacCommand
AcctCommand
AcctResponse
A base class for the several types of account information responses.
| Field Summary | |
static int |
ERRORCODE_CANNOT_DISPLAY_INFO
An error code indicating that, for some reason, account information cannot be displayed. |
static int |
ERRORCODE_NO_EMAIL
An error code indicating that this account has no associated email address. |
static int |
RESULT_ERROR
A result code indicating that an account information change failed. |
static int |
RESULT_SUCCESS
A result code indicating that an account information change was successfully made. |
static int |
TYPE_DEFAULT
The only response type seen as of this writing. |
| 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 | |
protected |
AcctResponse(int command,
int result)
Creates an outgoing account response command of the given SNAC subtype and with the given result code. |
protected |
AcctResponse(int command,
int type,
int result,
java.lang.String sn,
java.lang.String email,
int errorCode,
java.lang.String errorUrl)
Creates an outgoing account response command with the given properties. |
protected |
AcctResponse(int command,
int errorCode,
java.lang.String errorURL)
Creates an outgoing account response command of the given SNAC subtype and with the given error code and URL. |
protected |
AcctResponse(int command,
SnacPacket packet)
Generates an account response command of the given command subtype and read from the given incoming SNAC packet. |
| Method Summary | |
java.lang.String |
getEmail()
Returns the email address under which this screenname is registered, as sent in this command, or null if none was sent. |
int |
getErrorCode()
Returns the error code sent in this response, or -1 if none
was sent. |
java.lang.String |
getErrorUrl()
Returns the URL explaining the error code sent in this response. |
int |
getResult()
Returns the result code of this response. |
java.lang.String |
getScreenname()
Returns the screen name sent in this command, or null if
none was sent. |
int |
getType()
Returns the response type of this response. |
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 |
public static final int ERRORCODE_CANNOT_DISPLAY_INFO
public static final int ERRORCODE_NO_EMAIL
public static final int TYPE_DEFAULT
public static final int RESULT_SUCCESS
public static final int RESULT_ERROR
| Constructor Detail |
protected AcctResponse(int command,
SnacPacket packet)
command - the SNAC command subtype of this commandpacket - an account response packet
protected AcctResponse(int command,
int result)
TYPE_DEFAULT.
command - the SNAC command subtype of this commandresult - the result code, like RESULT_SUCCESS
protected AcctResponse(int command,
int errorCode,
java.lang.String errorURL)
TYPE_DEFAULT and the result code will be RESULT_ERROR.
command - the SNAC command subtype of this commanderrorCode - this command's error code, like ERRORCODE_NO_EMAILerrorURL - a URL describing this error, or null for
none
protected AcctResponse(int command,
int type,
int result,
java.lang.String sn,
java.lang.String email,
int errorCode,
java.lang.String errorUrl)
command - the SNAC command subtype of this commandtype - the response type, normally TYPE_DEFAULTresult - a result code, like RESULT_ERRORsn - a screen name, or null for noneemail - an email address, or null for noneerrorCode - an error code, like ERRORCODE_NO_EMAIL,
or -1 for noneerrorUrl - an error URL, or null for none| Method Detail |
public final int getType()
TYPE_DEFAULT.
public final int getResult()
RESULT_SUCCESS or RESULT_ERROR.
public final java.lang.String getScreenname()
null if
none was sent.
null if none
was sentpublic final java.lang.String getEmail()
null if none was sent.
null if none was sentpublic final int getErrorCode()
-1 if none
was sent.
-1 if none was sentpublic final java.lang.String getErrorUrl()
null if none
was sent
public void writeData(java.io.OutputStream out)
throws java.io.IOException
SnacCommand
writeData in class SnacCommandout - the stream to which to write the SNAC data
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 | |||||||||