com.day.cq.mcm.core.importer.pop3
Class Pop3Importer

java.lang.Object
  extended by com.day.cq.mcm.core.importer.AbstractMailImporter
      extended by com.day.cq.mcm.core.importer.pop3.Pop3Importer
All Implemented Interfaces:
Importer

@Service(value=Importer.class)
@Properties(value={@Property(name="service.description",value="POP Mail Importer"),@Property(name="importer.scheme",value={"pop3","pop3s"})})
public class Pop3Importer
extends AbstractMailImporter

A mail importer for the POP3 protocol.

This importer is bound to the pop3 and pop3s url scheme.

Configuration: Configuration is set in the data source URI query part. The following configuration is supported:

pop3.leave.on.server
Defines whether to leave messages on server or not. Set to true to leave messages on server, false otherwise. Defaults to true.

Examples:

pop3s://pop.gmail.com:995/INBOX?username=user&password=secret
Using pop3 over SSL to connect to GMail on port 995 with user/secret, leaving messages on server by default
pop3s://pop.gmail.com:995/INBOX?username=user&password=secret&pop3.leave.on. server=false
Using pop3 over SSL to connect to GMail 995 with user/secret, explicitly removing messages on server

See Also:
AbstractMailImporter

Field Summary
 
Fields inherited from class com.day.cq.mcm.core.importer.AbstractMailImporter
NODE_MESSAGE, PROPERTY_DATE, PROPERTY_FROM, PROPERTY_SUBJECT
 
Fields inherited from interface com.day.cq.polling.importer.Importer
SCHEME_PROPERTY, SERVICE_NAME
 
Constructor Summary
Pop3Importer()
           
 
Method Summary
protected  Properties getMailProperties(MailDataSource mailDataSource)
          Get the properties to use when establishing a mail session.
protected  Message[] getMessages(Folder folder, MailDataSource mailDataSource)
          Get the messages from the given folder.
 
Methods inherited from class com.day.cq.mcm.core.importer.AbstractMailImporter
connect, disconnect, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pop3Importer

public Pop3Importer()
Method Detail

getMailProperties

protected Properties getMailProperties(MailDataSource mailDataSource)
                                throws ImportException
Description copied from class: AbstractMailImporter
Get the properties to use when establishing a mail session. The properties to use are specific for a certain protocol provider.

For example: The IMAP protocol provider properties.

Specified by:
getMailProperties in class AbstractMailImporter
Returns:
Throws:
ImportException

getMessages

protected Message[] getMessages(Folder folder,
                                MailDataSource mailDataSource)
                         throws MessagingException
Description copied from class: AbstractMailImporter
Get the messages from the given folder. There are different ways to get messages depending on the protocol used.

Specified by:
getMessages in class AbstractMailImporter
Returns:
Throws:
MessagingException


Copyright © 2011-2012 Adobe Systems Incorporated. All Rights Reserved.