|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEventObject
SessionEvent
SessionNewMailEvent
Represents an new mail event. Yahoo likes to inform the client when there is Yahoo Mail which is unread. This object can take two different forms; the first being simply a count of unread mail (the most common) and the second being an actual e-mail itself (yet to actually see this 'in real life', but the documentation suggests it is possible).
The inherited method getFrom
returns the 'real world' name of
the e-mail sender (for example "John Smith") while getEmailAddress
returns the e-mail address (for example "j.smith@test.com").
If present, the e-mail body (text) can be read by using the inherited
getMessage
method.
  | getMailCount | getFrom | getEmailAddress | getSubject | getMessage |
newMailReceived (v1) | y (gt. zero) | n | n(?) | n | n |
newMailReceived (v2) | y (eq. zero) | y | y | y | y |
Field Summary |
Fields inherited from class EventObject |
source |
Constructor Summary | |
SessionNewMailEvent(Object o,
String ml)
Create a new instance. |
Method Summary | |
String |
getEmailAddress()
Returns the e-mail address of the sender. |
int |
getMailCount()
Gets the number of new Yahoo e-mails. |
String |
getSubject()
Returns the subject line of this mail, if this event represents an actual e-mail, not just a count. |
boolean |
isWholeMail()
Returns whether this event is an actual mail, or just a count. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class SessionEvent |
getFrom, getMessage, getStatus, getTimestamp, getTo |
Methods inherited from class EventObject |
getSource |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SessionNewMailEvent(Object o, String ml)
o
- source of event (Session
)ml
- number of new Yahoo e-mailsMethod Detail |
public int getMailCount()
public String getSubject()
null
.
public String getEmailAddress()
public boolean isWholeMail()
public String toString()
toString
in class SessionEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |