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

Interface com.tdac.mail.MailBoxInterface

public interface MailBoxInterface
extends Object
This interface defines a mailbox.
Version:
1.0, 11/11/96
Author:
Timothy D. A. Cox

Method Index

 o closeBox()
Close a mail box folder, expunging deleted messages
 o deleteMessage(int)
Delete a specific message
 o getFolders(String, List)
Retrieve a list of the mail box folders
 o getHeaders(List, int, int)
Retrieve all the mail headers parse into a List
 o getMessage(int, boolean)
Retrieve a specific message.
 o getMessage(TextArea, int, boolean)
Retrieve a specific message into a TextArea
 o login(String, String)
Login to the connected mail server using a userid and password
 o logout()
Logoff from the connected mail server using a userid and password
 o openBox(String)
Open a mail box folder for reading
 o parseFlags(Response)
Determine the available flags values (eg.
 o parseHeader(List, Response, int)
Parse a server response for the mail headers and place them into a list component.
 o parseNumMessages(Response)
Determine the number of messages in the mail box
 o parseNumRecent(Response)
Determine the number of un-seen messages in the mail box
 o parsePermanentFlags(Response)
Determine the available permanent flags values (eg.
 o purgeMessages()
Purge all deleted messages
 o undeleteMessage(int)
Un-delete a specific message

Methods

 o login
  public abstract void login(String userid,
                             String password) throws ExceptionMailConnection
Login to the connected mail server using a userid and password
Parameters:
userid - the mailbox name to login to
password - the mailbox password
 o logout
  public abstract void logout() throws ExceptionMailConnection
Logoff from the connected mail server using a userid and password
Parameters:
userid - the mailbox name to login to
password - the mailbox password
 o getFolders
  public abstract Response getFolders(String dir,
                                      List list) throws ExceptionMailConnection
Retrieve a list of the mail box folders
Parameters:
dir - the root directory for mail folders (eg. ~user/mail)
list - the java.awt.List component to receive the folder names
Returns:
server response from the command
 o openBox
  public abstract Response openBox(String name) throws ExceptionMailConnection
Open a mail box folder for reading
Parameters:
name - the mailbox folder to open
Returns:
server response from the command
 o closeBox
  public abstract Response closeBox() throws ExceptionMailConnection
Close a mail box folder, expunging deleted messages
Returns:
server response from the command
 o getHeaders
  public abstract MailHeader[] getHeaders(List list,
                                          int start,
                                          int end) throws ExceptionMailConnection
Retrieve all the mail headers parse into a List
Parameters:
list - the java.awt.List component to receive the headers
start - the first message to read
num - the number of messages to read
Returns:
an array of MailHeader objects
 o getMessage
  public abstract Response getMessage(int num,
                                      boolean full) throws ExceptionMailConnection
Retrieve a specific message.
Parameters:
msgnum - message number to retrieve
fullheader - true if the full RFC822 header is required
Returns:
server response from the command
 o getMessage
  public abstract Response getMessage(TextArea ta,
                                      int num,
                                      boolean full) throws ExceptionMailConnection
Retrieve a specific message into a TextArea
Parameters:
msgnum - message number to retrieve
fullheader - true if the full RFC822 header is required
Returns:
server response from the command
 o deleteMessage
  public abstract Response deleteMessage(int msgnum) throws ExceptionMailConnection
Delete a specific message
Parameters:
msgnum - message to be deleted
Returns:
server response from the command
 o undeleteMessage
  public abstract Response undeleteMessage(int msgnum) throws ExceptionMailConnection
Un-delete a specific message
Parameters:
msgnum - message to be deleted
Returns:
server response from the command
 o purgeMessages
  public abstract Response purgeMessages() throws ExceptionMailConnection
Purge all deleted messages
Returns:
server response from the command
 o parseNumMessages
  public abstract int parseNumMessages(Response r)
Determine the number of messages in the mail box
Parameters:
rsp - the server response to parse
Returns:
number of messages in the folder
 o parseNumRecent
  public abstract int parseNumRecent(Response r)
Determine the number of un-seen messages in the mail box
Parameters:
rsp - the server response to parse
Returns:
number of un-seen messages in the folder
 o parseFlags
  public abstract Vector parseFlags(Response r)
Determine the available flags values (eg. \Seen, \Deleted etc)
Parameters:
rsp - the server response to parse
Returns:
vector containing the Flag names
 o parsePermanentFlags
  public abstract Vector parsePermanentFlags(Response r)
Determine the available permanent flags values (eg. \Seen, \Deleted etc)
Parameters:
rsp - the server response to parse
Returns:
vector containing the Flag names
 o parseHeader
  public abstract MailHeader[] parseHeader(List list,
                                           Response r,
                                           int row) throws ExceptionMailConnection
Parse a server response for the mail headers and place them into a list component.
Parameters:
list - the java.awt.List that will recieve the headers
rsp - the server response to parse
num - the number of headers to parse
Returns:
an array of MailHeader objects

All Packages  Class Hierarchy  This Package  Previous  Next  Index