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:

Events: (none)

Methods:

 Copyright (c) Taligent, Inc.  1996 - 1997.
 Copyright (c) IBM Corporation 1996 - 1997.
 All Rights Reserved.
 

See Also:
POP3Client

Constructor Index

 o POP3Session()

Method Index

 o deleteMessage()
Delete message.
 o getLines()
Get number of lines to retrieve when invoking retrieveMessageTop().
 o getMessageNumber()
Get current message number.
 o getPassword()
Get current password.
 o getServer()
Return the current server.
 o getUser()
Get current user name.
 o isSustainedSession()
Query sustained session flag.
 o listMessages()
Retrieve list of messages.
 o listUniqueIdentifiers()
Retrieve list of unique message IDs.
 o logoff()
Logoff.
 o logon()
Logon.
 o main(String[])
 o messageSize()
Retrieve size of a message.
 o reset()
Reset session with the mail server.
 o retrieveMessage()
Retrieve current message.
 o retrieveMessageTop()
Retrieve top lines of a message.
 o setLines(int)
Set number of lines to retrieve when invoking retrieveMessageTop().
 o setMessageNumber(int)
Set message for target of ensuing operations.
 o setPassword(String)
Set password.
 o setServer(String)
Set the mail server name.
 o setSustainedSession(boolean)
Set sustained session.
 o setUser(String)
Set user login name.
 o showBeanClient()
Display the client for this bean.
 o status()
Fetch "drop listing", or status of the maildrop.
 o uniqueIdentifier()
Retrieve unique message ID of current message.

Constructors

 o POP3Session
 public POP3Session()

Methods

 o setServer
 public void setServer(String server)
Set the mail server name.

Parameters:
server - is the name of the mail server
 o getServer
 public String getServer()
Return the current server.

 o setUser
 public void setUser(String user)
Set user login name.

Parameters:
user - is the name of the POP3 user
 o getUser
 public String getUser()
Get current user name.

 o setPassword
 public void setPassword(String passwd)
Set password.

Parameters:
password - is the password of this POP3 user
 o getPassword
 public String getPassword()
Get current password.

 o 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.

 o isSustainedSession
 public boolean isSustainedSession()
Query sustained session flag.

 o 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)
 o getMessageNumber
 public int getMessageNumber()
Get current message number.

 o setLines
 public void setLines(int lines)
Set number of lines to retrieve when invoking retrieveMessageTop().

 o getLines
 public int getLines()
Get number of lines to retrieve when invoking retrieveMessageTop().

 o logon
 public void logon() throws IOException
Logon.

 o logoff
 public void logoff() throws IOException
Logoff.

 o 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
 o listMessages
 public String[] listMessages() throws IOException
Retrieve list of messages.

Returns:
An array of messages, null if an error is encountered
 o uniqueIdentifier
 public String uniqueIdentifier() throws IOException
Retrieve unique message ID of current message.

Returns:
Message ID string or null if an error is encountered
 o listUniqueIdentifiers
 public String[] listUniqueIdentifiers() throws IOException
Retrieve list of unique message IDs.

Returns:
Message ID array or null if an error is encountered
 o 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
 o 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
 o 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
 o deleteMessage
 public void deleteMessage() throws IOException
Delete message. Set a message number prior to invoking this method.

 o reset
 public void reset() throws IOException
Reset session with the mail server.

 o 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.

 o main
 public static void main(String argv[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index