|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.context.IntegrationObjectSupport org.springframework.integration.mail.AbstractMailReceiver org.springframework.integration.mail.ImapMailReceiver
public class ImapMailReceiver
A MailReceiver
implementation for receiving mail messages from a
mail server that supports the IMAP protocol. In addition to the pollable
AbstractMailReceiver.receive()
method, the waitForNewMessages()
method provides
the option of blocking until new messages are available prior to calling
AbstractMailReceiver.receive()
. That option is only available if the server supports
the idle
command.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.springframework.integration.mail.MailReceiver |
---|
MailReceiver.MailReceiverContext |
Field Summary |
---|
Fields inherited from class org.springframework.integration.mail.AbstractMailReceiver |
---|
folderOpenMode, initialized, logger, SI_USER_FLAG |
Constructor Summary | |
---|---|
ImapMailReceiver()
|
|
ImapMailReceiver(java.lang.String url)
|
Method Summary | |
---|---|
java.lang.Boolean |
isShouldMarkMessagesAsRead()
Check if messages should be marked as read. |
protected javax.mail.Message[] |
searchForNewMessages()
Retrieves new messages from this receiver's folder. |
protected void |
setAdditionalFlags(javax.mail.Message message)
Optional method allowing you to set additional flags. |
void |
setSearchTermStrategy(SearchTermStrategy searchTermStrategy)
Provides a way to set custom SearchTermStrategy to compile a SearchTerm
to be applied when retrieving mail |
void |
setShouldMarkMessagesAsRead(java.lang.Boolean shouldMarkMessagesAsRead)
Specify if messages should be marked as read. |
void |
waitForNewMessages()
This method is unique to the IMAP receiver and only works if IMAP IDLE is supported (see RFC 2177 for more detail). |
Methods inherited from class org.springframework.integration.mail.AbstractMailReceiver |
---|
deleteMessages, destroy, fetchMessages, getFolder, onInit, openFolder, receive, 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 |
Constructor Detail |
---|
public ImapMailReceiver()
public ImapMailReceiver(java.lang.String url)
Method Detail |
---|
public java.lang.Boolean isShouldMarkMessagesAsRead()
public void setSearchTermStrategy(SearchTermStrategy searchTermStrategy)
SearchTermStrategy
to compile a SearchTerm
to be applied when retrieving mail
searchTermStrategy
- public void setShouldMarkMessagesAsRead(java.lang.Boolean shouldMarkMessagesAsRead)
public void waitForNewMessages() throws javax.mail.MessagingException
javax.mail.MessagingException
protected javax.mail.Message[] searchForNewMessages() throws javax.mail.MessagingException
SearchTerm
that searches for all messages in the
folder that are RECENT
, not
ANSWERED
, and not
DELETED
. The search term is used
to search
for new messages.
searchForNewMessages
in class AbstractMailReceiver
javax.mail.MessagingException
- in case of JavaMail errorsprotected void setAdditionalFlags(javax.mail.Message message) throws javax.mail.MessagingException
AbstractMailReceiver
setAdditionalFlags
in class AbstractMailReceiver
javax.mail.MessagingException
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |