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:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationEventPublisherAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,org.springframework.integration.context.ExpressionCapable,org.springframework.integration.core.MessageProducer,org.springframework.integration.IntegrationPattern,org.springframework.integration.support.context.NamedComponent,org.springframework.integration.support.management.ManageableLifecycle,org.springframework.integration.support.management.ManageableSmartLifecycle,org.springframework.integration.support.management.TrackableComponent
public class ImapIdleChannelAdapter
extends org.springframework.integration.endpoint.MessageProducerSupport
implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.ApplicationEventPublisherAware
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.-
Nested Class Summary
Nested Classes Modifier and Type Class Description classImapIdleChannelAdapter.ImapIdleExceptionEvent -
Field Summary
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleCondition, lifecycleLock -
Constructor Summary
Constructors Constructor Description ImapIdleChannelAdapter(ImapMailReceiver mailReceiver) -
Method Summary
Modifier and Type Method Description voiddestroy()protected voiddoStart()protected voiddoStop()java.lang.StringgetComponentType()voidsetAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain)voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)voidsetBeanClassLoader(java.lang.ClassLoader classLoader)voidsetReconnectDelay(long reconnectDelay)The time between connection attempts in milliseconds (default 10 seconds).voidsetSendingTaskExecutor(java.util.concurrent.Executor sendingTaskExecutor)Specify anExecutorused to send messages received by the adapter.voidsetShouldReconnectAutomatically(boolean shouldReconnectAutomatically)Specify whether the IDLE task should reconnect automatically after catching aFolderClosedExceptionwhile waiting for messages.voidsetTransactionSynchronizationFactory(org.springframework.integration.transaction.TransactionSynchronizationFactory transactionSynchronizationFactory)Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, onInit, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherMethods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
-
Constructor Details
-
Method Details
-
setTransactionSynchronizationFactory
public void setTransactionSynchronizationFactory(org.springframework.integration.transaction.TransactionSynchronizationFactory transactionSynchronizationFactory) -
setAdviceChain
public void setAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain) -
setSendingTaskExecutor
public void setSendingTaskExecutor(java.util.concurrent.Executor sendingTaskExecutor)Specify anExecutorused 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 aFolderClosedExceptionwhile waiting for messages. The default value istrue.- Parameters:
shouldReconnectAutomatically- true to reconnect.
-
setReconnectDelay
public void setReconnectDelay(long reconnectDelay)The time between connection attempts in milliseconds (default 10 seconds).- Parameters:
reconnectDelay- the reconnectDelay to set- Since:
- 3.0.5
-
getComponentType
public java.lang.String getComponentType()- Specified by:
getComponentTypein interfaceorg.springframework.integration.support.context.NamedComponent- Overrides:
getComponentTypein classorg.springframework.integration.context.IntegrationObjectSupport
-
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)- Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
doStart
protected void doStart()- Overrides:
doStartin classorg.springframework.integration.endpoint.MessageProducerSupport
-
doStop
protected void doStop()- Overrides:
doStopin classorg.springframework.integration.endpoint.MessageProducerSupport
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Overrides:
destroyin classorg.springframework.integration.endpoint.AbstractEndpoint
-