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