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
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_FLAG
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
-
Constructor Summary
ConstructorDescriptionPop3MailReceiver
(String url) Pop3MailReceiver
(String host, int port, String username, String password) Pop3MailReceiver
(String host, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
deleteMessages
(Message[] messages) Deletes the given messages from this receiver's folder, and closes it to expunge deleted messages.protected Message[]
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, toString
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler
-
Field Details
-
PROTOCOL
- See Also:
-
-
Constructor Details
-
Pop3MailReceiver
public Pop3MailReceiver() -
Pop3MailReceiver
-
Pop3MailReceiver
-
Pop3MailReceiver
-
-
Method Details
-
searchForNewMessages
Description copied from class:AbstractMailReceiver
Subclasses must implement this method to return new mail messages.- Specified by:
searchForNewMessages
in classAbstractMailReceiver
- Returns:
- An array of messages.
- Throws:
MessagingException
- Any MessagingException.
-
deleteMessages
Deletes the given messages from this receiver's folder, and closes it to expunge deleted messages.- Overrides:
deleteMessages
in classAbstractMailReceiver
- Parameters:
messages
- the messages to delete- Throws:
MessagingException
- in case of JavaMail errors
-