Class Pop3MailReceiver
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.mail.AbstractMailReceiver
org.springframework.integration.mail.Pop3MailReceiver
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,ApplicationContextAware,ExpressionCapable,MailReceiver,NamedComponent
public class Pop3MailReceiver extends AbstractMailReceiver
A
MailReceiver implementation that polls a mail server using the
POP3 protocol.- Author:
- Arjen Poutsma, Mark Fisher
-
Field Summary
Fields inherited from class org.springframework.integration.mail.AbstractMailReceiver
DEFAULT_SI_USER_FLAGFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
Constructors Constructor Description Pop3MailReceiver()Pop3MailReceiver(String url)Pop3MailReceiver(String host, int port, String username, String password)Pop3MailReceiver(String host, String username, String password) -
Method Summary
Modifier and Type Method Description protected voiddeleteMessages(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
closeFolder, destroy, fetchMessages, getFolder, getFolderOpenMode, getJavaMailProperties, getUserFlag, onInit, openFolder, receive, setAdditionalFlags, setAutoCloseFolder, setEmbeddedPartsAsBytes, setHeaderMapper, setJavaMailAuthenticator, setJavaMailProperties, setMaxFetchSize, setProtocol, setSelectorExpression, setSession, setShouldDeleteMessages, setSimpleContent, setUserFlag, shouldDeleteMessages, toStringMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler
-
Field Details
-
PROTOCOL
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Pop3MailReceiver
public Pop3MailReceiver() -
Pop3MailReceiver
-
Pop3MailReceiver
-
Pop3MailReceiver
-
-
Method Details
-
searchForNewMessages
protected javax.mail.Message[] searchForNewMessages() throws javax.mail.MessagingExceptionDescription copied from class:AbstractMailReceiverSubclasses must implement this method to return new mail messages.- Specified by:
searchForNewMessagesin classAbstractMailReceiver- Returns:
- An array of messages.
- Throws:
javax.mail.MessagingException- Any MessagingException.
-
deleteMessages
protected void deleteMessages(javax.mail.Message[] messages) throws javax.mail.MessagingExceptionDeletes the given messages from this receiver's folder, and closes it to expunge deleted messages.- Overrides:
deleteMessagesin classAbstractMailReceiver- Parameters:
messages- the messages to delete- Throws:
javax.mail.MessagingException- in case of JavaMail errors
-