org.springframework.integration.mail
Class Pop3MailReceiver
java.lang.Object
org.springframework.integration.mail.AbstractMailReceiver
org.springframework.integration.mail.Pop3MailReceiver
- All Implemented Interfaces:
- DisposableBean, 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, isShouldMarkMessagesAsRead, openFolder, receive, setJavaMailAuthenticator, setJavaMailProperties, setMaxFetchSize, setProtocol, setSession, setShouldDeleteMessages, setShouldMarkMessagesAsRead, shouldDeleteMessages, toString |
Pop3MailReceiver
public Pop3MailReceiver()
Pop3MailReceiver
public Pop3MailReceiver(String url)
Pop3MailReceiver
public Pop3MailReceiver(String host,
String username,
String password)
Pop3MailReceiver
public Pop3MailReceiver(String host,
int port,
String username,
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
Copyright © 2010. All Rights Reserved.