Class ImapIdleChannelAdapterSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,P>
 
org.springframework.integration.dsl.MessageProducerSpec<ImapIdleChannelAdapterSpec,ImapIdleChannelAdapter>
 
org.springframework.integration.mail.dsl.ImapIdleChannelAdapterSpec
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<ImapIdleChannelAdapter>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
public class ImapIdleChannelAdapterSpec
extends MessageProducerSpec<ImapIdleChannelAdapterSpec,ImapIdleChannelAdapter>
implements ComponentsRegistration 
- Since:
- 5.0
- Author:
- Gary Russell, Artem Bilan, Freya Nair
- 
Field SummaryFieldsFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedImapIdleChannelAdapterSpec(ImapMailReceiver receiver) protectedImapIdleChannelAdapterSpec(ImapMailReceiver receiver, boolean externalReceiver) 
- 
Method SummaryModifier and TypeMethodDescriptionadviceChain(Advice... adviceChain) Configure a chain ofAdviceobjects for message delivery, applied to the downstream flow.autoCloseFolder(boolean autoCloseFolder) When configured tofalse, the folder is not closed automatically after a fetch.cancelIdleInterval(long interval) How often to recycle the idle task (in case of a silently dropped connection).embeddedPartsAsBytes(boolean embeddedPartsAsBytes) headerMapper(HeaderMapper<MimeMessage> headerMapper) Set the header mapper; if a header mapper is not provided, the message payload is aMimeMessage, when provided, the headers are mapped and the payload is theMimeMessagecontent.javaMailAuthenticator(Authenticator javaMailAuthenticator) javaMailProperties(Consumer<PropertiesBuilder> configurer) Configure thejavaMailPropertiesby invoking aConsumercallback which is invoked with aPropertiesBuilder.javaMailProperties(Properties javaMailProperties) maxFetchSize(int maxFetchSize) reconnectDelay(long reconnectDelay) The time between connection attempts in milliseconds (default 10 seconds).searchTermStrategy(SearchTermStrategy searchTermStrategy) selector(Function<MimeMessage, Boolean> selectorFunction) Configure aFunctionto select messages.selectorExpression(String selectorExpression) Configure a SpEL expression to select messages.selectorExpression(Expression selectorExpression) Configure anExpressionto select messages.A Java MailSessionto use.shouldDeleteMessages(boolean shouldDeleteMessages) shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead) shouldReconnectAutomatically(boolean shouldReconnectAutomatically) simpleContent(boolean simpleContent) Determine how the content is rendered.taskExecutor(Executor taskExecutor) Provide a managedExecutorto schedule a receiving IDLE task.Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor the downstream flow.transactional(TransactionInterceptor transactionInterceptor) Specify aTransactionInterceptorAdvicefor the downstream flow.transactional(TransactionManager transactionManager) Specify aTransactionInterceptorAdvicewith the providedTransactionManagerand defaultDefaultTransactionAttributefor the downstream flow.transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory) Configure aTransactionSynchronizationFactory.Set the name of the flag to use to flag messages when the server does not support \Recent but supports user flags; default "spring-integration-mail-adapter".Methods inherited from class org.springframework.integration.dsl.MessageProducerSpecautoStartup, errorChannel, errorChannel, errorMessageStrategy, id, observationConvention, outputChannel, outputChannel, phase, role, sendTimeout, shouldTrackMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Field Details- 
receiver
- 
componentsToRegister
- 
externalReceiverprotected final boolean externalReceiver
 
- 
- 
Constructor Details- 
ImapIdleChannelAdapterSpec
- 
ImapIdleChannelAdapterSpec
 
- 
- 
Method Details- 
selectorExpressionConfigure a SpEL expression to select messages. The root object for the expression evaluation is aMimeMessagewhich should return a boolean result (true means select the message).- Parameters:
- selectorExpression- the selectorExpression.
- Returns:
- the spec.
 
- 
selectorExpressionConfigure anExpressionto select messages. The root object for the expression evaluation is aMimeMessagewhich should return a boolean result (true means select the message).- Parameters:
- selectorExpression- the selectorExpression.
- Returns:
- the spec.
 
- 
selectorConfigure aFunctionto select messages. The argument for the function is aMimeMessage;applyreturns a boolean result (true means select the message).- Parameters:
- selectorFunction- the selectorFunction.
- Returns:
- the spec.
- See Also:
 
- 
sessionA Java MailSessionto use.- Parameters:
- session- the session.
- Returns:
- the spec.
- See Also:
 
- 
javaMailProperties- Parameters:
- javaMailProperties- the javaMailProperties.
- Returns:
- the spec.
- See Also:
 
- 
javaMailPropertiesConfigure thejavaMailPropertiesby invoking aConsumercallback which is invoked with aPropertiesBuilder.- Parameters:
- configurer- the configurer.
- Returns:
- the spec.
- See Also:
 
- 
javaMailAuthenticator- Parameters:
- javaMailAuthenticator- the javaMailAuthenticator.
- Returns:
- the spec.
- See Also:
 
- 
maxFetchSize- Parameters:
- maxFetchSize- the maxFetchSize.
- Returns:
- the spec.
- See Also:
 
- 
shouldDeleteMessages- Parameters:
- shouldDeleteMessages- the shouldDeleteMessages.
- Returns:
- the spec.
- See Also:
 
- 
searchTermStrategy- Parameters:
- searchTermStrategy- the searchTermStrategy.
- Returns:
- the spec.
- See Also:
 
- 
shouldMarkMessagesAsRead- Parameters:
- shouldMarkMessagesAsRead- the shouldMarkMessagesAsRead.
- Returns:
- the spec.
- See Also:
 
- 
userFlagSet the name of the flag to use to flag messages when the server does not support \Recent but supports user flags; default "spring-integration-mail-adapter".- Parameters:
- userFlag- the flag.
- Returns:
- the spec.
- See Also:
 
- 
headerMapperSet the header mapper; if a header mapper is not provided, the message payload is aMimeMessage, when provided, the headers are mapped and the payload is theMimeMessagecontent.- Parameters:
- headerMapper- the header mapper.
- Returns:
- the spec.
- See Also:
 
- 
embeddedPartsAsBytesWhen a header mapper is provided determine whether an embeddedPart(e.gMessageorMultipartcontent is rendered as a byte[] in the payload. Otherwise, leave as aPart. These objects are not suitable for downstream serialization. Default: true.This has no effect if there is no header mapper, in that case the payload is the MimeMessage.- Parameters:
- embeddedPartsAsBytes- the embeddedPartsAsBytes to set.
- Returns:
- the spec.
- See Also:
 
- 
autoCloseFolderWhen configured tofalse, the folder is not closed automatically after a fetch. It is the target application's responsibility to close it using theIntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCEheader from the message produced by this channel adapter.- Parameters:
- autoCloseFolder- set to- falseto keep folder opened.
- Returns:
- the spec.
- Since:
- 5.2
- See Also:
 
- 
transactionSynchronizationFactorypublic ImapIdleChannelAdapterSpec transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory) Configure aTransactionSynchronizationFactory. Usually used to synchronize message deletion with some external transaction manager.- Parameters:
- transactionSynchronizationFactory- the transactionSynchronizationFactory.
- Returns:
- the spec.
 
- 
adviceChainConfigure a chain ofAdviceobjects for message delivery, applied to the downstream flow.- Parameters:
- adviceChain- the advice chain.
- Returns:
- the spec.
 
- 
transactionalSpecify aTransactionInterceptorAdvicewith the providedTransactionManagerand defaultDefaultTransactionAttributefor the downstream flow.- Parameters:
- transactionManager- the- TransactionManagerto use.
- Returns:
- the spec.
- Since:
- 5.2.5
 
- 
transactionalSpecify aTransactionInterceptorAdvicefor the downstream flow.- Parameters:
- transactionInterceptor- the- TransactionInterceptorto use.
- Returns:
- the spec.
- See Also:
 
- 
transactionalSpecify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor the downstream flow.- Returns:
- the spec.
 
- 
shouldReconnectAutomaticallypublic ImapIdleChannelAdapterSpec shouldReconnectAutomatically(boolean shouldReconnectAutomatically) - Parameters:
- shouldReconnectAutomatically- the shouldReconnectAutomatically.
- Returns:
- the spec.
- See Also:
 
- 
cancelIdleIntervalHow often to recycle the idle task (in case of a silently dropped connection). Seconds; default 120 (2 minutes).- Parameters:
- interval- the interval.
- Returns:
- the spec.
- Since:
- 5.2
- See Also:
 
- 
reconnectDelayThe time between connection attempts in milliseconds (default 10 seconds).- Parameters:
- reconnectDelay- the reconnectDelay to set.
- Returns:
- the spec.
- Since:
- 6.0
 
- 
simpleContentDetermine how the content is rendered.- Parameters:
- simpleContent- true for simple content.
- Returns:
- the spec.
- Since:
- 5.5
- See Also:
 
- 
taskExecutorProvide a managedExecutorto schedule a receiving IDLE task.- Parameters:
- taskExecutor- the- Executorto use.
- Returns:
- the spec.
- Since:
- 6.2
 
- 
getComponentsToRegister- Specified by:
- getComponentsToRegisterin interface- ComponentsRegistration
 
 
-