javax.mail
Class Message

java.lang.Object
  extended byjavax.mail.Message
All Implemented Interfaces:
Part
Direct Known Subclasses:
MimeMessage

public abstract class Message
extends Object
implements Part

Version:
$Revision: 1.3 $ $Date: 2004/03/10 10:00:27 $

Nested Class Summary
static class Message.RecipientType
           
 
Field Summary
protected  boolean expunged
           
protected  Folder folder
           
protected  int msgnum
           
protected  Session session
           
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
protected Message()
           
protected Message(Folder folder, int number)
           
protected Message(Session session)
           
 
Method Summary
abstract  void addFrom(Address[] addresses)
           
 void addRecipient(Message.RecipientType type, Address address)
           
abstract  void addRecipients(Message.RecipientType type, Address[] addresses)
           
 Address[] getAllRecipients()
           
abstract  Flags getFlags()
           
 Folder getFolder()
           
abstract  Address[] getFrom()
           
 int getMessageNumber()
           
abstract  Date getReceivedDate()
           
abstract  Address[] getRecipients(Message.RecipientType type)
           
 Address[] getReplyTo()
           
abstract  Date getSentDate()
           
abstract  String getSubject()
           
 boolean isExpunged()
           
 boolean isSet(Flags.Flag flag)
           
 boolean match(SearchTerm term)
           
abstract  Message reply(boolean replyToAll)
           
abstract  void saveChanges()
           
protected  void setExpunged(boolean expunged)
           
 void setFlag(Flags.Flag flag, boolean set)
           
abstract  void setFlags(Flags flags, boolean set)
           
abstract  void setFrom()
           
abstract  void setFrom(Address address)
           
protected  void setMessageNumber(int number)
           
 void setRecipient(Message.RecipientType type, Address address)
           
abstract  void setRecipients(Message.RecipientType type, Address[] addresses)
           
 void setReplyTo(Address[] addresses)
           
abstract  void setSentDate(Date sent)
           
abstract  void setSubject(String subject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.mail.Part
addHeader, getAllHeaders, getContent, getContentType, getDataHandler, getDescription, getDisposition, getFileName, getHeader, getInputStream, getLineCount, getMatchingHeaders, getNonMatchingHeaders, getSize, isMimeType, removeHeader, setContent, setContent, setDataHandler, setDescription, setDisposition, setFileName, setHeader, setText, writeTo
 

Field Detail

expunged

protected boolean expunged

folder

protected Folder folder

msgnum

protected int msgnum

session

protected Session session
Constructor Detail

Message

protected Message()

Message

protected Message(Folder folder,
                  int number)

Message

protected Message(Session session)
Method Detail

addFrom

public abstract void addFrom(Address[] addresses)
                      throws MessagingException
Throws:
MessagingException

addRecipient

public void addRecipient(Message.RecipientType type,
                         Address address)
                  throws MessagingException
Throws:
MessagingException

addRecipients

public abstract void addRecipients(Message.RecipientType type,
                                   Address[] addresses)
                            throws MessagingException
Throws:
MessagingException

getAllRecipients

public Address[] getAllRecipients()
                           throws MessagingException
Throws:
MessagingException

getFlags

public abstract Flags getFlags()
                        throws MessagingException
Throws:
MessagingException

getFolder

public Folder getFolder()

getFrom

public abstract Address[] getFrom()
                           throws MessagingException
Throws:
MessagingException

getMessageNumber

public int getMessageNumber()

getReceivedDate

public abstract Date getReceivedDate()
                              throws MessagingException
Throws:
MessagingException

getRecipients

public abstract Address[] getRecipients(Message.RecipientType type)
                                 throws MessagingException
Throws:
MessagingException

getReplyTo

public Address[] getReplyTo()
                     throws MessagingException
Throws:
MessagingException

getSentDate

public abstract Date getSentDate()
                          throws MessagingException
Throws:
MessagingException

getSubject

public abstract String getSubject()
                           throws MessagingException
Throws:
MessagingException

isExpunged

public boolean isExpunged()

isSet

public boolean isSet(Flags.Flag flag)
              throws MessagingException
Throws:
MessagingException

match

public boolean match(SearchTerm term)
              throws MessagingException
Throws:
MessagingException

reply

public abstract Message reply(boolean replyToAll)
                       throws MessagingException
Throws:
MessagingException

saveChanges

public abstract void saveChanges()
                          throws MessagingException
Throws:
MessagingException

setExpunged

protected void setExpunged(boolean expunged)

setFlag

public void setFlag(Flags.Flag flag,
                    boolean set)
             throws MessagingException
Throws:
MessagingException

setFlags

public abstract void setFlags(Flags flags,
                              boolean set)
                       throws MessagingException
Throws:
MessagingException

setFrom

public abstract void setFrom()
                      throws MessagingException
Throws:
MessagingException

setFrom

public abstract void setFrom(Address address)
                      throws MessagingException
Throws:
MessagingException

setMessageNumber

protected void setMessageNumber(int number)

setRecipient

public void setRecipient(Message.RecipientType type,
                         Address address)
                  throws MessagingException
Throws:
MessagingException

setRecipients

public abstract void setRecipients(Message.RecipientType type,
                                   Address[] addresses)
                            throws MessagingException
Throws:
MessagingException

setReplyTo

public void setReplyTo(Address[] addresses)
                throws MessagingException
Throws:
MessagingException

setSentDate

public abstract void setSentDate(Date sent)
                          throws MessagingException
Throws:
MessagingException

setSubject

public abstract void setSubject(String subject)
                         throws MessagingException
Throws:
MessagingException


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.