Class GIT.GVU.IMAP.Tests.Driver
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class GIT.GVU.IMAP.Tests.Driver

java.lang.Object
   |
   +----GIT.GVU.IMAP.Tests.Driver

public class Driver
extends Object
Class to implement a little bitty text based mailer.

Constructor Index

 o Driver()

Method Index

 o createThenRenameThenDelete(Connection)
Function to demo how to use CREATE and RENAME.
 o listMailboxes(Connection)
Function to demo how to list the mailboxes.
 o login(Protocol)
Perform the login procedure
 o main(String[])
 o mainloop(Connection, Protocol)
This is the system's main loop...
 o writeMIME(BodyPart, FileOutputStream, String, int)
This function writes out a MIME message as HTML to a file.

Constructors

 o Driver
  public Driver()

Methods

 o listMailboxes
  public static void listMailboxes(Connection c) throws InternalErr, IMAPException
Function to demo how to list the mailboxes.
Parameters:
c - connection on which to perform the LIST command
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
 o createThenRenameThenDelete
  public static void createThenRenameThenDelete(Connection c) throws InternalErr, IMAPException
Function to demo how to use CREATE and RENAME. Note: This is currently dead code.
Parameters:
c - connection to perform the transactions on
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
 o writeMIME
  public static boolean writeMIME(BodyPart bp,
                                  FileOutputStream fs,
                                  String name,
                                  int num) throws IOException, InternalErr, IMAPException
This function writes out a MIME message as HTML to a file.
Parameters:
BodyPart - bp First BodyPart of the message
FileOutputStream - fs The file to write the HTML on
String - name is the base name of the message for generating tmp files
int - num number for generating external files
Returns:
boolean true if we succeeded with the whole message
Throws: IOException
is propagated
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
 o mainloop
  public static void mainloop(Connection c,
                              Protocol protocol) throws InternalErr, IMAPException, IOException
This is the system's main loop... read a string process the command then repeat
Parameters:
Connection - c the connection we are using
Protocol - p the prtocol which is the owner of this connection
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
Throws: IOException
is propagated
 o login
  public static Connection login(Protocol p) throws InternalErr, IMAPException, IOException
Perform the login procedure
Returns:
a connection object or null if the login failed
Throws: InternalErr
is propagated
Throws: IMAPException
is propagated
 o main
  public static void main(String argv[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index