|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.walluck.oscar.MsgCookie
'C' is for cookie, and also for caching.
Constructor Summary | |
MsgCookie()
Create a cookie and add the cookie to the cookie cache automatically. |
|
MsgCookie(AIMSession sess,
AIMConnection conn,
byte[] cookie,
int type,
java.lang.Object data)
Create a cookie and add the cookie to the cookie cache automatically. |
|
MsgCookie(AIMSession sess,
AIMConnection conn,
byte[] cookie,
int type,
java.lang.Object data,
boolean toc)
Create a TOC-compatible cookie and add the cookie to the cookie cache automatically. |
Method Summary | |
static void |
cacheCookie(AIMSession sess,
AIMConnection conn,
MsgCookie cookie)
Add a cookie to the cookie cache. |
static MsgCookie |
checkCookie(AIMSession sess,
AIMConnection conn,
MsgCookie cookie)
Check if the given cookie is in the cookie cache. |
boolean |
equals(java.lang.Object obj)
Tests the current cookie and the given cookie for equality. |
static byte[] |
genCookie(boolean toc)
Generate a cookie. |
long |
getAddTime()
Get the value of addTime. |
byte[] |
getCookie()
Get the value of cookie. |
java.lang.Object |
getData()
Get the value of data. |
int |
getType()
Get the value of type. |
int |
getType(int reqClass)
Get the cookie type based on the given capability. |
int |
hashCode()
The hashcode. |
void |
setAddTime(long addTime)
Set the value of addTime. |
void |
setCookie(byte[] cookie)
Set the value of cookie. |
void |
setData(java.lang.Object data)
Set the value of data. |
void |
setType(int type)
Set the value of type. |
static MsgCookie |
uncacheCookie(AIMSession sess,
AIMConnection conn,
MsgCookie cookie)
Get a cookie from the cookie cache and remove it from the cookie cache. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MsgCookie()
public MsgCookie(AIMSession sess, AIMConnection conn, byte[] cookie, int type, java.lang.Object data)
sess
- the oscar sessionconn
- the connectioncookie
- the cookietype
- the cookie typedata
- the cookie datapublic MsgCookie(AIMSession sess, AIMConnection conn, byte[] cookie, int type, java.lang.Object data, boolean toc)
sess
- the oscar sessionconn
- the connectioncookie
- the cookietype
- the cookie typedata
- the cookie datatoc
- set to true if you want TOC-compatible, false otherwiseMethod Detail |
public static byte[] genCookie(boolean toc)
toc
- set to true for TOC-compatible, false otherwise
public byte[] getCookie()
public void setCookie(byte[] cookie)
cookie
- Value to assign to cookie.public int getType()
public void setType(int type)
type
- Value to assign to type.public java.lang.Object getData()
public void setData(java.lang.Object data)
data
- Value to assign to data.public long getAddTime()
public void setAddTime(long addTime)
addTime
- Value to assign to addTime.public static void cacheCookie(AIMSession sess, AIMConnection conn, MsgCookie cookie)
If the cookie is found, update the addtime of the cached cookie, otherwise add it to the cache.
sess
- the oscar sessionconn
- the connectioncookie
- the MessageCookiepublic static MsgCookie uncacheCookie(AIMSession sess, AIMConnection conn, MsgCookie cookie)
sess
- the oscar sessionconn
- the connectioncookie
- the MessageCookie
public static MsgCookie checkCookie(AIMSession sess, AIMConnection conn, MsgCookie cookie)
sess
- the oscar sessionconn
- the connectioncookie
- the MessageCookie
public int getType(int reqClass)
reqClass
- the capability flag
public boolean equals(java.lang.Object obj)
obj
- the cookie to test
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |