|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSnacCommand
AuthCommand
AuthResponse
A SNAC command sent in response to an AuthRequest. This is the last
step of the authorization process.
AuthRequest0x17, command 0x03| Field Summary | |
static int |
ERROR_ACCOUNT_SUSPENDED
An error code indicating that the user's account has been suspended. |
static int |
ERROR_CLIENT_TOO_OLD
An error code indicating that the client software is too old to connect to AIM anymore. |
static int |
ERROR_CONNECTING_TOO_MUCH
An error code indicating that the user has been connecting too frequently. |
static int |
ERROR_INVALID_SN_OR_PASS
An error code indicating that the screenname and/or password provided is not valid. |
static int |
ERROR_TEMP_UNAVAILABLE
An error code indicating that AIM is currently unavailable. |
| Fields inherited from class AuthCommand |
CMD_AUTH_REQ, CMD_AUTH_RESP, CMD_KEY_REQ, CMD_KEY_RESP, FAMILY_AUTH, FAMILY_INFO |
| Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
| Constructor Summary | |
|
AuthResponse(int errorCode,
java.lang.String errorUrl)
Creates an outgoing authorization response command with the given error code and URL and no other properties. |
protected |
AuthResponse(SnacPacket packet)
Generates an authorization response command from the given incoming SNAC packet. |
|
AuthResponse(java.lang.String sn,
java.lang.String server,
int port,
ByteBlock cookie,
int regStatus,
java.lang.String email)
Creates an outgoing authorization response command with the given properties and no error code or error URL. |
|
AuthResponse(java.lang.String sn,
java.lang.String server,
int port,
ByteBlock cookie,
int regStatus,
java.lang.String email,
int errorCode,
java.lang.String errorUrl)
Creates an outgoing authorization response command with the given properties. |
| Method Summary | |
ByteBlock |
getCookie()
Returns the login cookie that should be provided to the given BOS server upon connecting. |
java.lang.String |
getEmail()
Returns the user's registered email address, or null if none
was sent. |
int |
getErrorCode()
Returns the error code sent in this command, or -1 if none
was sent. |
java.lang.String |
getErrorUrl()
Returns the "error URL" associated with the given error code, or null if none was sent. |
int |
getPort()
Returns the port on which the user should connect to the given BOS server, or -1 if none was sent. |
int |
getRegstatus()
Returns the user's "registration status visibility code," or -1 if none was sent. |
java.lang.String |
getScreenname()
Returns the screenname contained in this authorization response, or null if none was sent. |
java.lang.String |
getServer()
Returns the server to which the user should connect next for "basic online service," or null if none was sent. |
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 ERROR_INVALID_SN_OR_PASS
public static final int ERROR_ACCOUNT_SUSPENDED
public static final int ERROR_TEMP_UNAVAILABLE
public static final int ERROR_CONNECTING_TOO_MUCH
public static final int ERROR_CLIENT_TOO_OLD
| Constructor Detail |
protected AuthResponse(SnacPacket packet)
packet - the authorization response SNAC packet
public AuthResponse(java.lang.String sn,
java.lang.String server,
int port,
ByteBlock cookie,
int regStatus,
java.lang.String email)
sn - the user's screen nameserver - the BOS server to which the user should connectport - the port on which the user should connectcookie - a login cookie that the user should provide to the BOS
server upon connectingregStatus - the user's registration status codeemail - the user's registered email address
public AuthResponse(int errorCode,
java.lang.String errorUrl)
errorCode - an error code, like ERROR_ACCOUNT_SUSPENDEDerrorUrl - a URL explaining the given error code, or
null for none
public AuthResponse(java.lang.String sn,
java.lang.String server,
int port,
ByteBlock cookie,
int regStatus,
java.lang.String email,
int errorCode,
java.lang.String errorUrl)
sn - the user's screen name, or null for noneserver - the BOS server to which the user should connect, or
null for noneport - the port on which the user should connect, or -1
for nonecookie - a login cookie that the user should provide to the BOS
server upon connecting, or null for noneregStatus - the user's registration status code, or -1
for noneemail - the user's registered email address, or null
for noneerrorCode - an error code, or -1 for noneerrorUrl - a URL explaining the given error code, or
null for none| Method Detail |
public final java.lang.String getScreenname()
null if none was sent.
public final java.lang.String getServer()
null if none was sent.
public final int getPort()
-1 if none was sent.
public final ByteBlock getCookie()
public final int getRegstatus()
-1 if none was sent. This will normally be one of the
REGSTATUS_* constants defined in AcctModCmd.
public final java.lang.String getEmail()
null if none
was sent.
public final int getErrorCode()
-1 if none
was sent.
public final java.lang.String getErrorUrl()
null if none was sent. Often this URL
will be http://www.aol.com, but other times it's a URL that explains
an error code in detail.
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 | |||||||||