Spring Integration

org.springframework.integration.mail
Class ImapIdleChannelAdapter

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
              extended by org.springframework.integration.mail.ImapIdleChannelAdapter
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, NamedComponent, MessageProducer, TrackableComponent

public class ImapIdleChannelAdapter
extends MessageProducerSupport
implements org.springframework.beans.factory.BeanClassLoaderAware

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, Oleg Zhurakousky, Gary Russell

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
ImapIdleChannelAdapter(ImapMailReceiver mailReceiver)
           
 
Method Summary
protected  void doStart()
          Takes no action by default.
protected  void doStop()
          Takes no action by default.
 java.lang.String getComponentType()
          Subclasses may implement this method to provide component type information.
 void setAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain)
           
 void setBeanClassLoader(java.lang.ClassLoader classLoader)
           
 void setSendingTaskExecutor(java.util.concurrent.Executor sendingTaskExecutor)
          Specify an Executor used to send messages received by the adapter.
 void setShouldReconnectAutomatically(boolean shouldReconnectAutomatically)
          Specify whether the IDLE task should reconnect automatically after catching a FolderClosedException while waiting for messages.
 void setTransactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
           
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
onInit, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

ImapIdleChannelAdapter

public ImapIdleChannelAdapter(ImapMailReceiver mailReceiver)
Method Detail

setTransactionSynchronizationFactory

public void setTransactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)

setAdviceChain

public void setAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain)

setSendingTaskExecutor

public void setSendingTaskExecutor(java.util.concurrent.Executor sendingTaskExecutor)
Specify an Executor used to send messages received by the adapter.

Parameters:
sendingTaskExecutor - the sendingTaskExecutor to set

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.


getComponentType

public java.lang.String getComponentType()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this method to provide component type information.

Specified by:
getComponentType in interface NamedComponent
Overrides:
getComponentType in class IntegrationObjectSupport

setBeanClassLoader

public void setBeanClassLoader(java.lang.ClassLoader classLoader)
Specified by:
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware

doStart

protected void doStart()
Description copied from class: MessageProducerSupport
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Overrides:
doStart in class MessageProducerSupport

doStop

protected void doStop()
Description copied from class: MessageProducerSupport
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Overrides:
doStop in class MessageProducerSupport

Spring Integration