|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.walluck.oscar.MsgCookie
public class 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(AIMConnection conn,
byte[] cookie,
int type,
Object data)
Create a cookie and add the cookie to the cookie cache automatically. |
|
MsgCookie(AIMConnection conn,
byte[] cookie,
int type,
Object data,
boolean toc)
Create a TOC-compatible cookie and add the cookie to the cookie cache automatically. |
|
| Method Summary | |
|---|---|
static void |
cacheCookie(AIMConnection conn,
MsgCookie cookie)
Add a cookie to the cookie cache. |
static MsgCookie |
checkCookie(AIMConnection conn,
MsgCookie cookie)
Check if the given cookie is in the cookie cache. |
boolean |
equals(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. |
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(Object data)
Set the value of data. |
void |
setType(int type)
Set the value of type. |
static MsgCookie |
uncacheCookie(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(AIMConnection conn,
byte[] cookie,
int type,
Object data)
conn - the connectioncookie - the cookietype - the cookie typedata - the cookie data
public MsgCookie(AIMConnection conn,
byte[] cookie,
int type,
Object data,
boolean toc)
conn - the connectioncookie - the cookietype - the cookie typedata - the cookie datatoc - set to true if you want TOC-compatible, false otherwise| Method 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 Object getData()
public void setData(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(AIMConnection conn,
MsgCookie cookie)
If the cookie is found, update the addtime of the cached cookie, otherwise add it to the cache.
conn - the connectioncookie - the MessageCookie
public static MsgCookie uncacheCookie(AIMConnection conn,
MsgCookie cookie)
conn - the connectioncookie - the MessageCookie
public static MsgCookie checkCookie(AIMConnection conn,
MsgCookie cookie)
conn - the connectioncookie - the MessageCookie
public int getType(int reqClass)
reqClass - the capability flag
public boolean equals(Object obj)
equals in class Objectobj - the cookie to test
public int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||