org.springframework.integration.mail
Class ImapIdleChannelAdapter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.mail.ImapIdleChannelAdapter
- All Implemented Interfaces:
- BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, MessageProducer, NamedComponent
public class ImapIdleChannelAdapter
- extends MessageProducerSupport
An event-driven Channel Adapter that receives mail messages from a mail
server that supports the IMAP "idle" command (see RFC 2177). Received mail
messages will be converted and sent as Spring Integration Messages to the
output channel. The Message payload will be the Message
instance that was received.
- Author:
- Arjen Poutsma, Mark Fisher
Method Summary |
protected void |
doStart()
Subclasses must implement this method with the start behavior. |
protected void |
doStop()
Subclasses must implement this method with the stop behavior. |
protected void |
handleMailMessagingException(javax.mail.MessagingException e)
|
void |
setShouldReconnectAutomatically(boolean shouldReconnectAutomatically)
Specify whether the IDLE task should reconnect automatically after
catching a FolderClosedException while waiting for messages. |
void |
setTaskExecutor(Executor taskExecutor)
|
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, toString, writeMessageHistory |
ImapIdleChannelAdapter
public ImapIdleChannelAdapter(ImapMailReceiver mailReceiver)
setShouldReconnectAutomatically
public void setShouldReconnectAutomatically(boolean shouldReconnectAutomatically)
- Specify whether the IDLE task should reconnect automatically after
catching a
FolderClosedException
while waiting for messages.
The default value is true
.
setTaskExecutor
public void setTaskExecutor(Executor taskExecutor)
handleMailMessagingException
protected void handleMailMessagingException(javax.mail.MessagingException e)
doStart
protected void doStart()
- Description copied from class:
AbstractEndpoint
- Subclasses must implement this method with the start behavior.
This method will be invoked while holding the
AbstractEndpoint.lifecycleLock
.
- Specified by:
doStart
in class AbstractEndpoint
doStop
protected void doStop()
- Description copied from class:
AbstractEndpoint
- Subclasses must implement this method with the stop behavior.
This method will be invoked while holding the
AbstractEndpoint.lifecycleLock
.
- Specified by:
doStop
in class AbstractEndpoint
Copyright © 2010. All Rights Reserved.