All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.beans.net.POP3Session
java.lang.Object
|
+----COM.ibm.beans.net.POP3Session
- public class POP3Session
- extends Object
- implements Serializable
Java Bean that manages a POP3 session with a mail server.
Properties:
- mail server name/address
- user logon name and password
- sender's email address
- sustained session
- message number
- number of message lines
Events: (none)
Methods:
- logon
- logoff
- status
- list messages
- list unique message identifiers
- message size
- retrieve message
- retrieve message top
- delete message
- reset session
Copyright (c) Taligent, Inc. 1996 - 1997.
Copyright (c) IBM Corporation 1996 - 1997.
All Rights Reserved.
- See Also:
- POP3Client
-
POP3Session()
-
-
deleteMessage()
- Delete message.
-
getLines()
- Get number of lines to retrieve when invoking retrieveMessageTop().
-
getMessageNumber()
- Get current message number.
-
getPassword()
- Get current password.
-
getServer()
- Return the current server.
-
getUser()
- Get current user name.
-
isSustainedSession()
- Query sustained session flag.
-
listMessages()
- Retrieve list of messages.
-
listUniqueIdentifiers()
- Retrieve list of unique message IDs.
-
logoff()
- Logoff.
-
logon()
- Logon.
-
main(String[])
-
-
messageSize()
- Retrieve size of a message.
-
reset()
- Reset session with the mail server.
-
retrieveMessage()
- Retrieve current message.
-
retrieveMessageTop()
- Retrieve top lines of a message.
-
setLines(int)
- Set number of lines to retrieve when invoking retrieveMessageTop().
-
setMessageNumber(int)
- Set message for target of ensuing operations.
-
setPassword(String)
- Set password.
-
setServer(String)
- Set the mail server name.
-
setSustainedSession(boolean)
- Set sustained session.
-
setUser(String)
- Set user login name.
-
showBeanClient()
- Display the client for this bean.
-
status()
- Fetch "drop listing", or status of the maildrop.
-
uniqueIdentifier()
- Retrieve unique message ID of current message.
POP3Session
public POP3Session()
setServer
public void setServer(String server)
- Set the mail server name.
- Parameters:
- server - is the name of the mail server
getServer
public String getServer()
- Return the current server.
setUser
public void setUser(String user)
- Set user login name.
- Parameters:
- user - is the name of the POP3 user
getUser
public String getUser()
- Get current user name.
setPassword
public void setPassword(String passwd)
- Set password.
- Parameters:
- password - is the password of this POP3 user
getPassword
public String getPassword()
- Get current password.
setSustainedSession
public void setSustainedSession(boolean sustained)
- Set sustained session. Default is true.
A sustained session requires an explicit logon prior to
invoking POP3 services and an explicit logoff afterwards.
An unsustained session performs its own logon and logoff.
isSustainedSession
public boolean isSustainedSession()
- Query sustained session flag.
setMessageNumber
public void setMessageNumber(int msgNum)
- Set message for target of ensuing operations.
- Parameters:
- msgNum - is the message number to be set for ensuing commands
(starting at 1)
getMessageNumber
public int getMessageNumber()
- Get current message number.
setLines
public void setLines(int lines)
- Set number of lines to retrieve when invoking retrieveMessageTop().
getLines
public int getLines()
- Get number of lines to retrieve when invoking retrieveMessageTop().
logon
public void logon() throws IOException
- Logon.
logoff
public void logoff() throws IOException
- Logoff.
status
public String status() throws IOException
- Fetch "drop listing", or status of the maildrop.
- Returns:
- A string containg the mail server status, null if
an error is encountered
listMessages
public String[] listMessages() throws IOException
- Retrieve list of messages.
- Returns:
- An array of messages, null if an error is encountered
uniqueIdentifier
public String uniqueIdentifier() throws IOException
- Retrieve unique message ID of current message.
- Returns:
- Message ID string or null if an error is encountered
listUniqueIdentifiers
public String[] listUniqueIdentifiers() throws IOException
- Retrieve list of unique message IDs.
- Returns:
- Message ID array or null if an error is encountered
messageSize
public int messageSize() throws IOException
- Retrieve size of a message.
Set a message number prior to invoking this method.
- Returns:
- Message size (in bytes) or -1 if an error is encountered
retrieveMessage
public BufferedReader retrieveMessage() throws IOException
- Retrieve current message.
Set a message number prior to invoking this method.
See the description of POP3Client.retrieveMessage().
- Returns:
- A buffered reader to read the message from or null if an
error is encountered.
- See Also:
- retrieveMessage
retrieveMessageTop
public BufferedReader retrieveMessageTop() throws IOException
- Retrieve top lines of a message.
See the description of POP3Client.retrieveMessageTop().
- Returns:
- A buffered reader to read the message from or null if an
error is encountered.
- See Also:
- retrieveMessageTop
deleteMessage
public void deleteMessage() throws IOException
- Delete message. Set a message number prior to invoking this method.
reset
public void reset() throws IOException
- Reset session with the mail server.
showBeanClient
public void showBeanClient()
- Display the client for this bean. The default implementation of this
method will show the default Customizer for this bean, viz. the
POP3SessionCustomizer. To show a different UI for this bean, this
method must be overridden appropriately.
main
public static void main(String argv[])
All Packages Class Hierarchy This Package Previous Next Index