net.kano.joscar.snaccmd.auth
Class KeyRequest
java.lang.Object
SnacCommand
AuthCommand
KeyRequest
- public class KeyRequest
- extends AuthCommand
A SNAC command used to request an "authorization key" which can then be used
for logging in. This is the first step in the authorization process.
- See Also:
KeyResponse
- Source of this SNAC:
- AIM client
- SNAC command type:
- Family
0x17
, command 0x06
Constructor Summary |
protected |
KeyRequest(SnacPacket packet)
Generates a new key request command from the given incoming SNAC packet. |
|
KeyRequest(java.lang.String sn)
Creates a new outgoing key request command with the given screenname. |
Method Summary |
java.lang.String |
getScreenname()
Returns the screenname sent in this key request. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
KeyRequest
protected KeyRequest(SnacPacket packet)
- Generates a new key request command from the given incoming SNAC packet.
- Parameters:
packet
- a key request packet
KeyRequest
public KeyRequest(java.lang.String sn)
- Creates a new outgoing key request command with the given screenname.
- Parameters:
sn
- the screenname requesting an authorization key
getScreenname
public final java.lang.String getScreenname()
- Returns the screenname sent in this key request.
- Returns:
- the user's screenname
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()