|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object EventObject SessionEvent
Represents an incoming message type event. There are several fields of
note here: firstly from
which denotes who sent the message;
secondly message
which is the ASCII or UTF-8 of the message
text; and finally timestamp
which is used in some
circumstances to date the message or set an expiry date.
  | getTo | getFrom | getMessage | getTimestamp |
contactRejectionReceived | y | y | y | n |
contactRequestReceived | y | y | y | y |
messageReceived | y | y | y | n |
buzzReceived | y | y | y | n |
offlineMessageReceived | y | y | y | y |
listReceived/i> | n | n | n | n |
logoffReceived | n | n | n | n |
Field Summary |
Fields inherited from class EventObject |
source |
Constructor Summary | |
SessionEvent(Object o)
Create a new instance. |
|
SessionEvent(Object o,
String t,
String f)
Create a new instance. |
|
SessionEvent(Object o,
String t,
String f,
String m)
Create a new instance. |
|
SessionEvent(Object o,
String t,
String f,
String m,
String dt)
Create a new instance. |
Method Summary | |
String |
getFrom()
Returns the from field, the Yahoo user who sent this
message (this may be their actual id, or one of their identities). |
String |
getMessage()
Returns the message field, the ASCII or UTF-8 text of
the message itself. |
long |
getStatus()
Returns the status as presented in the Yahoo packet header. |
Date |
getTimestamp()
Returns the timestamp field, which is used by some message
types, for example off-line messages. |
String |
getTo()
Returns the to field, which should (if the message is legit) contain the client's Yahoo id or one of their identities. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class EventObject |
getSource |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SessionEvent(Object o)
o
- source of event (Session
)public SessionEvent(Object o, String t, String f)
o
- source of event (Session
)t
- to (Yahoo id)f
- from (Yahoo id)public SessionEvent(Object o, String t, String f, String m)
o
- source of event (Session
)t
- to (Yahoo id)f
- from (Yahoo id)m
- message (ASCII or UTF-8)public SessionEvent(Object o, String t, String f, String m, String dt)
o
- source of event (Session
)t
- to (Yahoo id)f
- from (Yahoo id)m
- message (ASCII or UTF-8)dt
- timestamp (Unix, seconds)Method Detail |
public String getTo()
public String getFrom()
from
field, the Yahoo user who sent this
message (this may be their actual id, or one of their identities).
public String getMessage()
message
field, the ASCII or UTF-8 text of
the message itself.
public Date getTimestamp()
timestamp
field, which is used by some message
types, for example off-line messages. (If unused, it will be null).
Date
objectpublic long getStatus()
StatusConstants
interfacepublic String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |