OOP Pop3Receiver Version 2.2

com.bentofw.popreceiver
Interface MailReceiver


public interface MailReceiver

For each mail retrieved from the POP3 server, received(ReceivedMail,ConfigPerPop3) is called.

Pop3Receiver connects to the POP3 server and retrieves a series of incomming e-mails. For each incomming e-mail, Pop3Receiver creates the instance of ReceivedMail and calls:

of this interface. Because ReceivedMail has a set of getXX methods, the implementation of this interface can access the various parts of the incomming e-mail, such as the subject, TO address, FROM address and body text. In addtition, the body of the file attachment is also available in ReceivedMail along with the file name and Content-Type.

You can define a set of configuration parameters in the XML for this API. And those set of key-value pairs are available in the second parameter of: of this interface.

Author:
Jun Inamori
See Also:
ReceivedMail

Method Summary
 void init()
          After Pop3Receiver creates the instance of this interface, this method is called.
 void received(ReceivedMail mail, ConfigPerPop3 config)
          For each mail retrieved from the POP3 server, this method is called.
 

Method Detail

received

void received(ReceivedMail mail,
              ConfigPerPop3 config)
For each mail retrieved from the POP3 server, this method is called.

Pop3Receiver connects to the POP3 server and retrieves a series of incomming e-mails. For each incomming e-mail, Pop3Receiver creates the instance of ReceivedMail and calls this method.

Because ReceivedMail has a set of getXX methods, the implementation of this interface can access the various parts of the incomming e-mail, such as the subject, TO address, FROM address, body text and so on. In addtition, the body of the file attachment is also available in ReceivedMail along with the file name and Content-Type.
What do you do with ReceivedMail fully depends on your implementation.

You can define a set of configuration parameters in the XML for this API. And those set of key-value pairs are available in the second parameter of of this method.

Parameters:
mail - The instance of ReceivedMail which represents the e-mail from the POP3 server.
config - The instance of ConfigPerPop3, where a set of configuration parameters are available.

init

void init()
          throws NestedException
After Pop3Receiver creates the instance of this interface, this method is called.

This method will be the good place to load the property file and initialize the resources. Any exception should be wraped within NestedException.

Throws:
NestedException

OOP Pop3Receiver Version 2.2

ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.