|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjadex.bdi.planlib.messaging.AIM
public class AIM
AIM The class provides utilities to connect to the AIM instant messaging network and send messages using TOC version 2.
| Field Summary | |
|---|---|
String |
authHost
The OSCAR authentication server. |
int |
authPort
The OSCAR authentication server's port. |
protected Socket |
connection
The connection to the TOC server. |
static int |
DATA
The ID number for a DATA packet (flap). |
protected String |
id
Screen name of current user. |
protected InputStream |
is
An InputStream to the connection. |
String |
language
What language to use. |
protected OutputStream |
os
An OutputStream to the connection. |
String |
roastString
The string used to "roast" passwords. |
protected short |
sequence
The sequence number used for FLAP packets. |
static int |
SIGNON
The ID number for a SIGNON packet(FLAP). |
String |
tocHost
The host address of the TOC server. |
int |
tocPort
The port used to connect to the TOC server. |
String |
version
The version of the client. |
| Constructor Summary | |
|---|---|
AIM(String id,
String password)
Constructor for AIM. |
|
| Method Summary | |
|---|---|
protected int |
calculateCode(String uid,
String pwd)
Calculate a login security code from the user id and password. |
protected String |
encode(String str)
Called to encode a message. |
String |
getError()
Getter for error |
protected String |
getFlap()
Get a FLAP packet |
boolean |
isLoggedin()
Getter for loggedin |
boolean |
login(String id,
String password)
Log in to TOC |
void |
logout()
Logout of toc and close the socket |
protected String |
normalize(String name)
Called to normalize a screen name. |
protected String |
roastPassword(String str)
Called to roast the password. |
void |
send(String to,
String msg)
Send a IM |
protected void |
sendFlap(int type,
String str)
Send a FLAP packet |
protected void |
sendFlapSignon()
Send a FLAP signon packet |
protected void |
sendRaw(String str)
Send a string over the socket as raw bytes |
protected void |
writeWord(short word)
Write a little endian word |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String tocHost
public int tocPort
public String authHost
public int authPort
public String language
public String version
public String roastString
protected short sequence
protected Socket connection
protected InputStream is
protected OutputStream os
protected String id
public static final int SIGNON
public static final int DATA
| Constructor Detail |
|---|
public AIM(String id,
String password)
id - password - | Method Detail |
|---|
public boolean login(String id,
String password)
id - The screen name to login withpassword - The screen name's password
public void logout()
protected String roastPassword(String str)
str - The password to roast
protected int calculateCode(String uid,
String pwd)
uid - The user id to encodepwd - The password to encoude
protected void sendRaw(String str)
throws IOException
str - The string to send
IOException
protected void writeWord(short word)
throws IOException
word - A word to write
IOException
protected void sendFlapSignon()
throws IOException
IOException
protected void sendFlap(int type,
String str)
throws IOException
type - The type DATA or SIGNONstr - The string message to send
IOException
protected String getFlap()
throws IOException
IOException
public void send(String to,
String msg)
to - Screen name to send an IM tomsg - The instant messageprotected String normalize(String name)
name - The screen name
protected String encode(String str)
str - The string to be encoded
public String getError()
public boolean isLoggedin()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||