wtanaka.praya.yahoo
Class MailMessage

java.lang.Object
  |
  +--wtanaka.praya.obj.Obj
        |
        +--wtanaka.praya.obj.Message
              |
              +--wtanaka.praya.yahoo.MailMessage
All Implemented Interfaces:
java.io.Serializable

public class MailMessage
extends Message
implements java.io.Serializable

Signifies that you have new mail.

Return to Sourceforge or the Praya Homepage

Version:
$Name: $ $Date: 2001/10/15 07:49:07 $
Author:
$Author: wtanaka $
See Also:
Serialized Form

Field Summary
(package private)  int number
           
static java.lang.String SUBJECT
          Symbolic constant for mail message subject, for use in identifying this subclass without a call to instanceof.
(package private)  java.lang.String user
           
 
Fields inherited from class wtanaka.praya.obj.Message
generatedBy, score
 
Fields inherited from class wtanaka.praya.obj.Obj
CONTENTS, date, DATE, FROM, privThread, REVCONTENTS, REVDATE, REVFROM, REVSCORE, REVSUBJECT, SCORE, secretObject
 
Constructor Summary
MailMessage(Protocol parent, java.lang.String user, int number)
          Constructs a message telling you that you have mail.
 
Method Summary
 java.lang.String getContents()
           
 java.lang.String getFrom()
           
 int getNumMessages()
          Gets the number of new messages that the user returned from getUser() has.
 java.lang.String getSubject()
          Gets the subject for this message.
 java.lang.String getUser()
          Gets the user who has new mail.
 Recipient replyRecipient()
          Gets the recipient to whom replies to this message will be sent, if applicable.
 
Methods inherited from class wtanaka.praya.obj.Message
changeScore, convertStringToHtml, getScore, getSourceProtocol, isSelfMessage, isStateChangeMessage, lessThan, renderAsHTML, renderAsHTML, renderAsString, setZombie, toString
 
Methods inherited from class wtanaka.praya.obj.Obj
getTimeStamp, isPrivileged, setPrivilegedThread, setSecretObject, setTimeStamp
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

SUBJECT

public static final java.lang.String SUBJECT
Symbolic constant for mail message subject, for use in identifying this subclass without a call to instanceof.
See Also:
getSubject()

user

java.lang.String user

number

int number
Constructor Detail

MailMessage

public MailMessage(Protocol parent,
                   java.lang.String user,
                   int number)
Constructs a message telling you that you have mail.
Parameters:
bobuser - the person who logged in.
Method Detail

getUser

public java.lang.String getUser()
Gets the user who has new mail.
Returns:
the id of the user who has new mail.

getNumMessages

public int getNumMessages()
Gets the number of new messages that the user returned from getUser() has.
Returns:
an integer representing the number of new messages for this user.

getSubject

public java.lang.String getSubject()
Gets the subject for this message.
Overrides:
getSubject in class Obj
Returns:
SUBJECT

getContents

public java.lang.String getContents()
Overrides:
getContents in class Obj

replyRecipient

public Recipient replyRecipient()
Description copied from class: Message
Gets the recipient to whom replies to this message will be sent, if applicable.
Overrides:
replyRecipient in class Message
Following copied from class: wtanaka.praya.obj.Message
Returns:
the recipient object for replies to this message. If there is no relevant recipient (e.g. this a logout message) returns null.

getFrom

public java.lang.String getFrom()
Overrides:
getFrom in class Obj