Class com.tdac.mail.MailBox
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.tdac.mail.MailBox

java.lang.Object
   |
   +----com.tdac.mail.MailBox

public class MailBox
extends Object
This class provides a conceptual mail box, independant of the type of connection used to communicate with the mail server.
Version:
1.0, 11/11/96
Author:
Timothy D. A. Cox
See Also:
MailConnection

Variable Index

 o flags
list of flags available for the mail box (eg.
 o headers
The list of message headers
 o messages
The list of message bodies
 o name
current mail box folder name (eg.
 o nummessages
number of messages in the mail box
 o permanentflags
list of permanent flags available for the mail box (eg.
 o recent
number of un-seen messages in the mail box

Constructor Index

 o MailBox(MailConnection)
Construct a mail box via a mail connection object

Method Index

 o close()
Close the mail box folder
 o deleteMessage(int)
Delete a mail message
 o getHeader(int)
Retrieve a cached header
 o getHeadersToList(List)
Retrieve all of the message headers from the server and place them into a list component.
 o getMessageToTextArea(TextArea, int, boolean)
Retrieve a message from the server and place it into a TextArea component.
 o open(String)
Open a mail box folder and determine the number of messages, number of recent messages and the flags
 o purgeBox()
Perform an 'expunge' to clear the deleted messages
 o refreshHeaders(List)
Fill a java.awt.List component with the current message headers
 o unDeleteMessage(int)
Un-delete a mail message

Variables

 o name
  public String name
current mail box folder name (eg. 'inbox')
 o flags
  public Vector flags
list of flags available for the mail box (eg. \Seen, \Deleted)
 o permanentflags
  public Vector permanentflags
list of permanent flags available for the mail box (eg. \Seen, \Deleted)
 o nummessages
  public int nummessages
number of messages in the mail box
 o recent
  public int recent
number of un-seen messages in the mail box
 o headers
  public Hashtable headers
The list of message headers
 o messages
  public Hashtable messages
The list of message bodies

Constructors

 o MailBox
  public MailBox(MailConnection con)
Construct a mail box via a mail connection object

Methods

 o open
  public boolean open(String mbname) throws InternalException
Open a mail box folder and determine the number of messages, number of recent messages and the flags
Parameters:
mbname - mail box folder name
 o close
  public boolean close() throws InternalException
Close the mail box folder
 o deleteMessage
  public boolean deleteMessage(int i) throws InternalException
Delete a mail message
Parameters:
i - message number to be deleted
 o unDeleteMessage
  public boolean unDeleteMessage(int i) throws InternalException
Un-delete a mail message
Parameters:
i - message number to be un-deleted
 o purgeBox
  public boolean purgeBox() throws InternalException
Perform an 'expunge' to clear the deleted messages
 o refreshHeaders
  public void refreshHeaders(List l)
Fill a java.awt.List component with the current message headers
Parameters:
l - the list component to be filled
 o getHeadersToList
  public boolean getHeadersToList(List list) throws InternalException
Retrieve all of the message headers from the server and place them into a list component. They are also cached.
Parameters:
l - the list component to be filled
 o getHeader
  public MailHeader getHeader(int num)
Retrieve a cached header
Parameters:
l - message number to get
 o getMessageToTextArea
  public boolean getMessageToTextArea(TextArea ta,
                                      int msgnum,
                                      boolean fullheader) throws InternalException
Retrieve a message from the server and place it into a TextArea component. This method will store the message body in a cache.
Parameters:
ta - the TextArea component to be filled
msgnum - message to be retrieved

All Packages  Class Hierarchy  This Package  Previous  Next  Index