org.springframework.integration.adapter.mail
Class PollingMailSource
java.lang.Object
org.springframework.integration.adapter.mail.PollingMailSource
- All Implemented Interfaces:
- MessageSource, PollableSource
public class PollingMailSource
- extends java.lang.Object
- implements PollableSource
MessageSource
implementation which delegates to a
MonitoringStrategy
to poll a mailbox. Each poll of the mailbox may
return more than one message which will then be stored locally using the
provided LocalMailMessageStore
- Author:
- Jonas Partner
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private final org.apache.commons.logging.Log logger
folderConnection
private final FolderConnection folderConnection
converter
private MailMessageConverter converter
mailMessageStore
private LocalMailMessageStore mailMessageStore
PollingMailSource
public PollingMailSource(FolderConnection folderConnetion)
receive
public Message receive()
- Description copied from interface:
PollableSource
- Retrieve a message from this source or
null
if no message is available.
- Specified by:
receive
in interface PollableSource
setConverter
public void setConverter(MailMessageConverter converter)
setMailMessageStore
public void setMailMessageStore(LocalMailMessageStore mailMessageStore)
getFolderConnection
public FolderConnection getFolderConnection()
getConverter
public MailMessageConverter getConverter()
getMailMessageStore
public LocalMailMessageStore getMailMessageStore()