All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface netscape.messaging.pop3.IPOP3Sink

public interface IPOP3Sink
IPOP3Sink is the interface for the response sink for all POP3 commands.

The IPOP3Sink interface contains callback methods for each client call. The client’s processResponses call invokes the appropriate interface callback method.

To utilize the POP3 object, you must extend this interface. As a convenience, the Messaging Access SDK provides the POP3Sink class, which implements the IPOP3Sink interface. You can save a step by extending the POP3Sink class, or you can implement your own class based on the IPOP3Sink interface. The constructor for the POP3Client class takes an IPOP3Sink interface as a parameter.

For detailed information about POP3, see RFC 1939. (For the URL, see "Where to Find More Information" in "About This Book.")


Method Index

 o connect(StringBuffer)
Notification for the response to the connection to the server.
 o delete(StringBuffer)
Notification for the response to the DELE command.
 o error(StringBuffer)
Error notification.
 o list(int, int)
Notification for the response to the LIST command.
 o listComplete()
Notification for the completion of the LIST command.
 o listStart()
Notification for the start of the LIST command.
 o noop()
Notification for the response to the NOOP command.
 o pass(StringBuffer)
Notification for the response to the PASS command.
 o quit(StringBuffer)
Notification for the response to the QUIT command.
 o reset(StringBuffer)
Notification for the response to the RSET command.
 o retrieve(byte[])
Notification for raw message from the RETR command.
 o retrieveComplete()
Notification for the completion of the RETR command.
 o retrieveStart(int, int)
Notification for the start of a message from the RETR command.
 o sendCommand(StringBuffer)
Notification for the response to the extended method.
 o sendCommandComplete()
Notification for the completion of the extended command.
 o sendCommandStart()
Notification for the start of the extended method.
 o stat(int, int)
Notification for the response to the STAT command.
 o top(StringBuffer)
Notification for a line of the message from the TOP command.
 o topComplete()
Notification for the completion of the TOP command.
 o topStart(int)
Notification for the start of a message from the TOP command.
 o uidList(int, StringBuffer)
Notification for the response to the UIDL command.
 o uidListComplete()
Notification for the completion of the UIDL command.
 o uidListStart()
Notification for the start of the UIDL command.
 o user(StringBuffer)
Notification for the response to the USER command.
 o xAuthList(int, int, StringBuffer)
Notification for the response to the XAUTHLIST command.
 o xAuthListComplete()
Notification for the completion of the XAUTHLIST command.
 o xAuthListStart()
Notification for the start of the XAUTHLIST command.
 o xSender(StringBuffer)
Notification for the response to the XSENDER command.

Methods

 o connect
 public abstract void connect(StringBuffer in_responseMessage)
Notification for the response to the connection to the server.

Connects to the server using the default port. See "POP3 Response Codes" in Chapter 5, "Receiving Mail with POP3."

Parameters:
in_responseMessage - Server response for connect.
See Also:
connect, quit
 o delete
 public abstract void delete(StringBuffer in_responseMessage)
Notification for the response to the DELE command. Marks a message for deletion on the server; actually deleted when quit() is called. Sends the DELE [arg] POP3 protocol command.

Parameters:
in_responseMessage - Server response for delete.
See Also:
delete, quit
 o error
 public abstract void error(StringBuffer in_responseMessage) throws POP3ServerException
Error notification. Called when an error occurs. See "POP3 Response Codes" in Chapter 5, "Receiving Mail with POP3."

Parameters:
in_responseMessage - Server response for an error.
Throws: POP3ServerException
If a server response error occurs.
See Also:
processResponses
 o listStart
 public abstract void listStart()
Notification for the start of the LIST command. Along with list and listComplete, can be used to list all messages.

See Also:
list, listComplete, list
 o list
 public abstract void list(int in_messageNumber,
                           int in_octetCount)
Notification for the response to the LIST command. Along with listStart and listComplete, can be used to list all messages.

Parameters:
in_messageNumber - Number of message to list.
in_octetCount - Octet count of the message.
See Also:
list, listStart, listComplete
 o listComplete
 public abstract void listComplete()
Notification for the completion of the LIST command. Along with list and listStart, can be used to list all messages.

See Also:
list, listStart, list
 o noop
 public abstract void noop()
Notification for the response to the NOOP command.

Server responds to commands with a "still here" response. Sending the noop method does nothing except force this response. Can be used to maintain server connection, perhaps being issued at timed intervals to make sure that the server is still active.

Resets the autologout timer inside the server. Not needed by applications that do not need to maintain the connection.

See Also:
noop
 o pass
 public abstract void pass(StringBuffer in_responseMessage)
Notification for the response to the PASS command. Identifies the user password; on success, the POP3 session enters the Transaction state.

Parameters:
in_responseMessage - Server response for pass.
See Also:
pass
 o quit
 public abstract void quit(StringBuffer in_responseMessage)
Notification for the response to the QUIT command. Closes the connection with the POP3 server, purges deleted messages, and logs the user out from the server.

If issued in Authentication state, server closes connection. If issued in Transaction state, server goes into the Update state and deletes marked messages, then quits.

Parameters:
in_responseMessage - Server response for quit.
See Also:
quit
 o reset
 public abstract void reset(StringBuffer in_responseMessage)
Notification for the response to the RSET command. POP3 can affect server only by deleting/undeleting messages with delete and reset.

Parameters:
in_responseMessage - Server response for reset.
See Also:
reset, retrieve, delete
 o retrieveStart
 public abstract void retrieveStart(int in_messageNumber,
                                    int in_octetCount)
Notification for the start of a message from the RETR command. Along with retrieve and retrieveComplete, can be used to retrieve the message data.

Parameters:
in_messageNumber - Number of message to list.
in_octetCount - Octet count of the message.
See Also:
retrieve, retrieve, retrieveComplete
 o retrieve
 public abstract void retrieve(byte in_messageData[])
Notification for raw message from the RETR command. Along with retrieveStart and retrieveComplete, can be used to retrieve the message data.

Parameters:
in_messageData - Message data to retrieve.
See Also:
retrieve, retrieveStart, retrieveComplete
 o retrieveComplete
 public abstract void retrieveComplete()
Notification for the completion of the RETR command. Along with retrieve and retrieveStart, can be used to retrieve the data in the message.

See Also:
retrieve, retrieveStart, retrieve
 o sendCommandStart
 public abstract void sendCommandStart()
Notification for the start of the extended method. Along with sendCommand and sendCommandComplete, extends the protocol to meet client application needs. See "POP3 Response Codes" in Chapter 5, "Receiving Mail with POP3."

See Also:
sendCommand, sendCommand, sendCommandComplete
 o sendCommand
 public abstract void sendCommand(StringBuffer in_line)
Notification for the response to the extended method. Along with sendCommandStart and sendCommandComplete, extends the protocol to meet client application needs. Sends commands that are not supported by the Messaging SDK implementation of POP3. Can get extended server information, possibly multiline. See "POP3 Response Codes" in Chapter 5, "Receiving Mail with POP3."

Parameters:
in_line - Number of lines of the body to read.
See Also:
sendCommand
 o sendCommandComplete
 public abstract void sendCommandComplete()
Notification for the completion of the extended command. Along with sendCommandStart and sendCommand, extends the protocol to meet client application needs. See "POP3 Response Codes" in Chapter 5, "Receiving Mail with POP3."

See Also:
sendCommand, sendCommandStart, sendCommand
 o stat
 public abstract void stat(int in_messageCount,
                           int in_octetCount)
Notification for the response to the STAT command. Gets the status of the mail drop: returns the number of messages and octet size of the mail drop. Always returns message octet count.

Parameters:
in_messageCount - Number of messages.
in_octetCount - Octet count of the message.
See Also:
stat
 o topStart
 public abstract void topStart(int in_messageNumber)
Notification for the start of a message from the TOP command. Along with the top and topComplete methods, retrieves the headers plus the specified number of lines from the message.

Parameters:
in_messageNumber - Number of message.
See Also:
top, top, topComplete
 o top
 public abstract void top(StringBuffer in_line)
Notification for a line of the message from the TOP command. Along with the topStart and topComplete methods, retrieves the headers plus the specified number of lines from the message. Issues a 'TOP [arg1] [arg2]' command.

Parameters:
in_line - Number of lines of the body to read.
See Also:
top, top, topComplete
 o topComplete
 public abstract void topComplete()
Notification for the completion of the TOP command. Along with the top and topStart methods, retrieves the headers plus the specified number of lines from the message.

See Also:
top, top, topStart
 o uidListStart
 public abstract void uidListStart()
Notification for the start of the UIDL command. Along with uidList and uidListComplete, goes through all the messages in the mailbox and generates a list line by line. Uses the UIDL POP3 protocol command.

See Also:
uidList, uidList, uidListComplete, listStart
 o uidList
 public abstract void uidList(int in_messageNumber,
                              StringBuffer in_uid)
Notification for the response to the UIDL command. Along with uidListStart and uidListComplete, goes through all the messages in the mailbox and generates a list line by line.

Parameters:
in_messageNumber - Number of message.
in_uid - Unique ID of message.
See Also:
uidList, uidListStart, uidListComplete, list
 o uidListComplete
 public abstract void uidListComplete()
Notification for the completion of the UIDL command. Along with uidListStart and uidList, goes through all the messages in the mailbox and generates a list line by line.

See Also:
uidList, uidList, uidListStart, ListComplete
 o user
 public abstract void user(StringBuffer in_responseMessage)
Notification for the response to the USER command.

Parameters:
in_responseMessage - Server response for user.
See Also:
user
 o xAuthListStart
 public abstract void xAuthListStart()
Notification for the start of the XAUTHLIST command. Along with xAuthList and xAuthListComplete, gets a list of authenticated users.

See Also:
xAuthList, xAuthList, xAuthListComplete
 o xAuthList
 public abstract void xAuthList(int in_messageNumber,
                                int in_octetCount,
                                StringBuffer in_emailAddress)
Notification for the response to the XAUTHLIST command. Along with xAuthListStart and xAuthListComplete, gets a list of authenticated users.

Parameters:
in_messageNumber - Number of message.
in_octetCount - Octet count of the message.
in_emailAddress - Email address.
See Also:
xAuthList, xAuthListStart, xAuthListComplete
 o xAuthListComplete
 public abstract void xAuthListComplete()
Notification for the completion of the XAUTHLIST command. Along with xAuthList and xAuthListStart, gets a list of authenticated users.

See Also:
xAuthList, xAuthList, xAuthListStart
 o xSender
 public abstract void xSender(StringBuffer in_emailAddress)
Notification for the response to the XSENDER command. Gets the email address of the sender of the specified message. Sends the XSENDER [arg] POP3 protocol command.

Parameters:
in_emailAddress - Email address.
See Also:
xSender

All Packages  Class Hierarchy  This Package  Previous  Next  Index