All Packages Class Hierarchy This Package Previous Next Index
Class netscape.messaging.pop3.POP3Sink
java.lang.Object
|
+----netscape.messaging.pop3.POP3Sink
- public class POP3Sink
- extends Object
- implements IPOP3Sink
POP3Sink is the default implementation of the response sink for all
POP3 commands.
The POP3Sink object contains callback methods for each client call.
The client’s processResponses call invokes the appropriate
object method.
The Messaging Access SDK provides the POP3Sink class as a convenience
implementation the POP3Sink interface.
You can save a step by extending the POP3Sink class, or
you can implement your own class based on the POP3Sink
interface. The constructor for the POP3Sink class takes an
POP3Sink interface as a parameter.
By default,
this implementation does nothing, except for the error callback, which
throws an exception.
-
POP3Sink()
-
-
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.
POP3Sink
public POP3Sink()
connect
public 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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, topStart, topComplete
topComplete
public 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 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 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 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 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 void xAuthListStart()
- Notification for the start of the XAUTHLIST command.
Along with xAuthList and xAuthListComplete, sends the
XAUTHLIST POP3 protocol command.
- See Also:
- xAuthList, xAuthList, xAuthListComplete
xAuthList
public void xAuthList(int in_messageNumber,
int in_octetCount,
StringBuffer in_emailAddress)
- Notification for the response to the XAUTHLIST command.
Along with xAuthListStart and xAuthListComplete, sends the
XAUTHLIST POP3 protocol command.
- Parameters:
- in_messageNumber - Number of message.
- in_octetCount - Octet count of the message.
- in_emailAddress - Email address.
- See Also:
- xAuthList, xAuthListStart, xAuthListComplete
xAuthListComplete
public void xAuthListComplete()
- Notification for the completion of the XAUTHLIST command.
Along with xAuthList and xAuthListStart, sends the
XAUTHLIST POP3 protocol command.
- See Also:
- xAuthList, xAuthList, xAuthListStart
xSender
public 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