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