All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.network.mail.pop3.protocol.POP3Connection

java.lang.Object
   |
   +----com.ibm.network.mail.pop3.protocol.POP3Connection

public class POP3Connection
extends Object
implements Runnable
This class implements the POP3 protocol functionality. It runs as a separate thread for every new connection that is requested by the CoreProtocolBean.

POP3Connection does the following:

  1. Socksification, if required
  2. Opens a socket connection to POP3 server
  3. Talks POP3 protocol and receives messages
  4. Deletes messages, if so configured
  5. Interprets the response from server and passes it on to CoreProtocolBean
  6. Informs the CoreProtocolBean of errors, if any
  7. Passes on the received messages to CoreProtocolBean
  8. Writes the received message to a file, if so configured

Author:
Mohit M Sant
See Also:
CoreProtocolBean

Constructor Index

 o POP3Connection(ServerOptions, boolean, ServerOptions, UserOptions, boolean, String, StatusReceiver)
Constructor for POP3Connection.
 o POP3Connection(ServerOptions, UserOptions, boolean, String, StatusReceiver)
Constructor for POP3Connection.

Method Index

 o receive()
Receives new messages from POP3 server.
 o run()
Starts a new thread for receiving messages.

Constructors

 o POP3Connection
 public POP3Connection(ServerOptions pop3,
                       UserOptions usr,
                       boolean saveMessages,
                       String saveFile,
                       StatusReceiver reportTo) throws POP3Exception, SocketException
Constructor for POP3Connection. Constructs with POP3 server, user details and receiver of status.

Parameters:
pop3 - POP3 server details.
usr - user details.
saveMessages - 'true' if messages are to be saved to a local file.
saveFile - the name of the file to which messages are to be saved.
reportTo - the status receiver, i.e the receiver of status information.
Throws: POP3Exception
if user details are not set.
See Also:
ServerOptions, UserOptions
 o POP3Connection
 public POP3Connection(ServerOptions pop3,
                       boolean socksified,
                       ServerOptions socks,
                       UserOptions usr,
                       boolean saveMessages,
                       String saveFile,
                       StatusReceiver reportTo) throws SocketException, POP3Exception
Constructor for POP3Connection. Constructs a POP3 connection with POP3 and socks servers, user details and receiver of status.

Parameters:
pop3 - POP3 server details.
socksified - true if socks server is to be used, false othwerwise.
socks - socks server details.
usr - user details.
reportTo - the status receiver, i.e the receiver of status information.
Throws: POP3Exception
if user details are not set.
See Also:
ServerOptions, UserOptions

Methods

 o receive
 public void receive()
Receives new messages from POP3 server.

 o run
 public void run()
Starts a new thread for receiving messages.


All Packages  Class Hierarchy  This Package  Previous  Next  Index