org.springframework.integration.mail
Class Pop3MailReceiver
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.mail.AbstractMailReceiver
org.springframework.integration.mail.Pop3MailReceiver
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, NamedComponent, MailReceiver
public class Pop3MailReceiver
- extends AbstractMailReceiver
A MailReceiver
implementation that polls a mail server using the
POP3 protocol.
- Author:
- Arjen Poutsma, Mark Fisher
Method Summary |
protected void |
deleteMessages(javax.mail.Message[] messages)
Deletes the given messages from this receiver's folder, and closes it to expunge deleted messages. |
protected javax.mail.Message[] |
searchForNewMessages()
Subclasses must implement this method to return new mail messages. |
Methods inherited from class org.springframework.integration.mail.AbstractMailReceiver |
destroy, fetchMessages, getFolder, onInit, openFolder, receive, setAdditionalFlags, setJavaMailAuthenticator, setJavaMailProperties, setMaxFetchSize, setProtocol, setSelectorExpression, setSession, setShouldDeleteMessages, shouldDeleteMessages, toString |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Pop3MailReceiver
public Pop3MailReceiver()
Pop3MailReceiver
public Pop3MailReceiver(java.lang.String url)
Pop3MailReceiver
public Pop3MailReceiver(java.lang.String host,
java.lang.String username,
java.lang.String password)
Pop3MailReceiver
public Pop3MailReceiver(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password)
searchForNewMessages
protected javax.mail.Message[] searchForNewMessages()
throws javax.mail.MessagingException
- Description copied from class:
AbstractMailReceiver
- Subclasses must implement this method to return new mail messages.
- Specified by:
searchForNewMessages
in class AbstractMailReceiver
- Throws:
javax.mail.MessagingException
deleteMessages
protected void deleteMessages(javax.mail.Message[] messages)
throws javax.mail.MessagingException
- Deletes the given messages from this receiver's folder, and closes it to expunge deleted messages.
- Overrides:
deleteMessages
in class AbstractMailReceiver
- Parameters:
messages
- the messages to delete
- Throws:
javax.mail.MessagingException
- in case of JavaMail errors