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.
-
Driver()
-
-
createThenRenameThenDelete(Connection)
- Function to demo how to use CREATE and RENAME.
-
listMailboxes(Connection)
- Function to demo how to list the mailboxes.
-
login(Protocol)
- Perform the login procedure
-
main(String[])
-
-
mainloop(Connection, Protocol)
-
This is the system's main loop...
-
writeMIME(BodyPart, FileOutputStream, String, int)
- This function writes out a MIME message as HTML to a file.
Driver
public Driver()
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
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
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
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
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
main
public static void main(String argv[])
All Packages Class Hierarchy This Package Previous Next Index