Interface w3c.mail.MailFolder
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface w3c.mail.MailFolder

public interface MailFolder
extends Object
A generic mail folder front-end. This interface describes a mail folder front-end object. Take has been takento be able to implement it efficiently (ie caching).

Two accessing methods are provided:

sequential
With this method, the folder is accessed sequentially.
indexed
With this method, the folder is accessed randomly.

Method Index

 o getMailMessage(int)
Indexed access.
 o getMailMessageInputStream(MailMessage)
Get a mail body.
 o getName()
Get this folder name.
 o getNextMailMessage()
Sequential access method.
 o hasMoreMailMessages()
Sequential access method.
 o resetMailSequence()
Sequential access method.

Methods

 o getName
  public abstract String getName()
Get this folder name.
 o hasMoreMailMessages
  public abstract boolean hasMoreMailMessages()
Sequential access method. Does this folder has more messages ?
Returns:
true if more messages are available.
 o getNextMailMessage
  public abstract MailMessage getNextMailMessage()
Sequential access method. Get the next message out of this folder.
Returns:
The next MailMessage contained by this folder.
 o resetMailSequence
  public abstract void resetMailSequence()
Sequential access method. Reset the sequence, so that the user can rescan the mail folder.
 o getMailMessage
  public abstract MailMessage getMailMessage(int idx)
Indexed access. Get the mail message whose number in the folder is given.
Parameters:
idx - The mail message index (its number in the sequence).
Returns:
The corresponding MailMessage instance.
 o getMailMessageInputStream
  public abstract InputStream getMailMessageInputStream(MailMessage msg)
Get a mail body.
Parameters:
msg - The MailMessage instance whose body is to be retreived.
Returns:
An InputStream that will deliver the mail body.

All Packages  Class Hierarchy  This Package  Previous  Next  Index