|
||||||||||
| 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 | |
|---|---|
java.lang.String |
authHost
The OSCAR authentication server. |
int |
authPort
The OSCAR authentication server's port. |
protected java.net.Socket |
connection
The connection to the TOC server. |
static int |
DATA
The ID number for a DATA packet (flap). |
protected java.lang.String |
id
Screen name of current user. |
protected java.io.InputStream |
is
An InputStream to the connection. |
java.lang.String |
language
What language to use. |
protected java.io.OutputStream |
os
An OutputStream to the connection. |
java.lang.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). |
java.lang.String |
tocHost
The host address of the TOC server. |
int |
tocPort
The port used to connect to the TOC server. |
java.lang.String |
version
The version of the client. |
| Constructor Summary | |
|---|---|
AIM(java.lang.String id,
java.lang.String password)
Constructor for AIM. |
|
| Method Summary | |
|---|---|
protected int |
calculateCode(java.lang.String uid,
java.lang.String pwd)
Calculate a login security code from the user id and password. |
protected java.lang.String |
encode(java.lang.String str)
Called to encode a message. |
java.lang.String |
getError()
Getter for error |
protected java.lang.String |
getFlap()
Get a FLAP packet |
boolean |
isLoggedin()
Getter for loggedin |
boolean |
login(java.lang.String id,
java.lang.String password)
Log in to TOC |
void |
logout()
Logout of toc and close the socket |
protected java.lang.String |
normalize(java.lang.String name)
Called to normalize a screen name. |
protected java.lang.String |
roastPassword(java.lang.String str)
Called to roast the password. |
void |
send(java.lang.String to,
java.lang.String msg)
Send a IM |
protected void |
sendFlap(int type,
java.lang.String str)
Send a FLAP packet |
protected void |
sendFlapSignon()
Send a FLAP signon packet |
protected void |
sendRaw(java.lang.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 java.lang.String tocHost
public int tocPort
public java.lang.String authHost
public int authPort
public java.lang.String language
public java.lang.String version
public java.lang.String roastString
protected short sequence
protected java.net.Socket connection
protected java.io.InputStream is
protected java.io.OutputStream os
protected java.lang.String id
public static final int SIGNON
public static final int DATA
| Constructor Detail |
|---|
public AIM(java.lang.String id,
java.lang.String password)
id - password - | Method Detail |
|---|
public boolean login(java.lang.String id,
java.lang.String password)
id - The screen name to login withpassword - The screen name's password
public void logout()
protected java.lang.String roastPassword(java.lang.String str)
str - The password to roast
protected int calculateCode(java.lang.String uid,
java.lang.String pwd)
uid - The user id to encodepwd - The password to encoude
protected void sendRaw(java.lang.String str)
throws java.io.IOException
str - The string to send
java.io.IOException
protected void writeWord(short word)
throws java.io.IOException
word - A word to write
java.io.IOException
protected void sendFlapSignon()
throws java.io.IOException
java.io.IOException
protected void sendFlap(int type,
java.lang.String str)
throws java.io.IOException
type - The type DATA or SIGNONstr - The string message to send
java.io.IOException
protected java.lang.String getFlap()
throws java.io.IOException
java.io.IOException
public void send(java.lang.String to,
java.lang.String msg)
to - Screen name to send an IM tomsg - The instant messageprotected java.lang.String normalize(java.lang.String name)
name - The screen name
protected java.lang.String encode(java.lang.String str)
str - The string to be encoded
public java.lang.String getError()
public boolean isLoggedin()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||