public class ImapIdleChannelAdapterSpec extends MessageProducerSpec<ImapIdleChannelAdapterSpec,ImapIdleChannelAdapter> implements ComponentsRegistration
Modifier and Type | Field and Description |
---|---|
protected boolean |
externalReceiver |
logger, PARSER, target
Modifier and Type | Method and Description |
---|---|
ImapIdleChannelAdapterSpec |
adviceChain(org.aopalliance.aop.Advice... adviceChain)
Configure a chain of
Advice objects for message delivery, applied to
the downstream flow. |
ImapIdleChannelAdapterSpec |
embeddedPartsAsBytes(boolean embeddedPartsAsBytes)
When a header mapper is provided determine whether an embedded
Part (e.g
Message or Multipart content is rendered as a byte[] in
the payload. |
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
ImapIdleChannelAdapterSpec |
headerMapper(HeaderMapper<javax.mail.internet.MimeMessage> headerMapper)
Set the header mapper; if a header mapper is not provided, the message payload is
a
MimeMessage , when provided, the headers are mapped and the payload is
the MimeMessage content. |
ImapIdleChannelAdapterSpec |
javaMailAuthenticator(javax.mail.Authenticator javaMailAuthenticator) |
ImapIdleChannelAdapterSpec |
javaMailProperties(java.util.function.Consumer<PropertiesBuilder> configurer)
Configure the
javaMailProperties by invoking a Consumer callback which
is invoked with a PropertiesBuilder . |
ImapIdleChannelAdapterSpec |
javaMailProperties(java.util.Properties javaMailProperties) |
ImapIdleChannelAdapterSpec |
maxFetchSize(int maxFetchSize) |
ImapIdleChannelAdapterSpec |
searchTermStrategy(SearchTermStrategy searchTermStrategy) |
ImapIdleChannelAdapterSpec |
selector(java.util.function.Function<javax.mail.internet.MimeMessage,java.lang.Boolean> selectorFunction)
Configure a
Function to select messages. |
ImapIdleChannelAdapterSpec |
selectorExpression(org.springframework.expression.Expression selectorExpression)
Configure an
Expression to select messages. |
ImapIdleChannelAdapterSpec |
selectorExpression(java.lang.String selectorExpression)
Configure a SpEL expression to select messages.
|
ImapIdleChannelAdapterSpec |
sendingTaskExecutor(java.util.concurrent.Executor sendingTaskExecutor)
Specify a task executor to be used to send messages to the downstream flow.
|
ImapIdleChannelAdapterSpec |
session(javax.mail.Session session)
A Java Mail
Session to use. |
ImapIdleChannelAdapterSpec |
shouldDeleteMessages(boolean shouldDeleteMessages) |
ImapIdleChannelAdapterSpec |
shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead) |
ImapIdleChannelAdapterSpec |
shouldReconnectAutomatically(boolean shouldReconnectAutomatically) |
ImapIdleChannelAdapterSpec |
transactional()
Specify a
TransactionInterceptor Advice with default
PlatformTransactionManager and DefaultTransactionAttribute for the
downstream flow. |
ImapIdleChannelAdapterSpec |
transactional(org.springframework.transaction.PlatformTransactionManager transactionManager)
Specify a
TransactionInterceptor Advice with the provided
PlatformTransactionManager and default DefaultTransactionAttribute
for the downstream flow. |
ImapIdleChannelAdapterSpec |
transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)
Specify a
TransactionInterceptor Advice for the
downstream flow. |
ImapIdleChannelAdapterSpec |
transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
Configure a
TransactionSynchronizationFactory . |
ImapIdleChannelAdapterSpec |
userFlag(java.lang.String userFlag)
Set the name of the flag to use to flag messages when the server does
not support \Recent but supports user flags;
default .
|
autoStartup, errorChannel, errorChannel, errorMessageStrategy, id, outputChannel, outputChannel, phase, sendTimeout, shouldTrack
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, isSingleton
public ImapIdleChannelAdapterSpec selectorExpression(java.lang.String selectorExpression)
MimeMessage
which should return a boolean
result (true means select the message).selectorExpression
- the selectorExpression.public ImapIdleChannelAdapterSpec selectorExpression(org.springframework.expression.Expression selectorExpression)
Expression
to select messages. The root object for the expression
evaluation is a MimeMessage
which should return a boolean
result (true means select the message).selectorExpression
- the selectorExpression.public ImapIdleChannelAdapterSpec selector(java.util.function.Function<javax.mail.internet.MimeMessage,java.lang.Boolean> selectorFunction)
Function
to select messages. The argument for the function
is a MimeMessage
; apply
returns a boolean
result (true means select the message).selectorFunction
- the selectorFunction.FunctionExpression
public ImapIdleChannelAdapterSpec session(javax.mail.Session session)
Session
to use.session
- the session.AbstractMailReceiver.setSession(Session)
public ImapIdleChannelAdapterSpec javaMailProperties(java.util.Properties javaMailProperties)
javaMailProperties
- the javaMailProperties.AbstractMailReceiver.setJavaMailProperties(Properties)
public ImapIdleChannelAdapterSpec javaMailProperties(java.util.function.Consumer<PropertiesBuilder> configurer)
javaMailProperties
by invoking a Consumer
callback which
is invoked with a PropertiesBuilder
.configurer
- the configurer.AbstractMailReceiver.setJavaMailProperties(Properties)
public ImapIdleChannelAdapterSpec javaMailAuthenticator(javax.mail.Authenticator javaMailAuthenticator)
javaMailAuthenticator
- the javaMailAuthenticator.AbstractMailReceiver.setJavaMailAuthenticator(Authenticator)
public ImapIdleChannelAdapterSpec maxFetchSize(int maxFetchSize)
maxFetchSize
- the maxFetchSize.AbstractMailReceiver.setMaxFetchSize(int)
public ImapIdleChannelAdapterSpec shouldDeleteMessages(boolean shouldDeleteMessages)
shouldDeleteMessages
- the shouldDeleteMessages.AbstractMailReceiver.setShouldDeleteMessages(boolean)
public ImapIdleChannelAdapterSpec searchTermStrategy(SearchTermStrategy searchTermStrategy)
searchTermStrategy
- the searchTermStrategy.ImapMailReceiver.setSearchTermStrategy(SearchTermStrategy)
public ImapIdleChannelAdapterSpec shouldMarkMessagesAsRead(boolean shouldMarkMessagesAsRead)
shouldMarkMessagesAsRead
- the shouldMarkMessagesAsRead.ImapMailReceiver.setShouldMarkMessagesAsRead(Boolean)
public ImapIdleChannelAdapterSpec userFlag(java.lang.String userFlag)
userFlag
- the flag.AbstractMailReceiver.setUserFlag(String)
public ImapIdleChannelAdapterSpec headerMapper(HeaderMapper<javax.mail.internet.MimeMessage> headerMapper)
MimeMessage
, when provided, the headers are mapped and the payload is
the MimeMessage
content.headerMapper
- the header mapper.AbstractMailReceiver.setUserFlag(String)
,
embeddedPartsAsBytes(boolean)
public ImapIdleChannelAdapterSpec embeddedPartsAsBytes(boolean embeddedPartsAsBytes)
Part
(e.g
Message
or Multipart
content is rendered as a byte[] in
the payload. Otherwise, leave as a Part
. 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
.
embeddedPartsAsBytes
- the embeddedPartsAsBytes to set.headerMapper(HeaderMapper)
public ImapIdleChannelAdapterSpec transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
TransactionSynchronizationFactory
. Usually used to synchronize
message deletion with some external transaction manager.transactionSynchronizationFactory
- the transactionSynchronizationFactory.public ImapIdleChannelAdapterSpec adviceChain(org.aopalliance.aop.Advice... adviceChain)
Advice
objects for message delivery, applied to
the downstream flow.adviceChain
- the advice chain.public ImapIdleChannelAdapterSpec transactional(org.springframework.transaction.PlatformTransactionManager transactionManager)
TransactionInterceptor
Advice
with the provided
PlatformTransactionManager
and default DefaultTransactionAttribute
for the downstream flow.transactionManager
- the PlatformTransactionManager
to use.public ImapIdleChannelAdapterSpec transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)
TransactionInterceptor
Advice
for the
downstream flow.transactionInterceptor
- the TransactionInterceptor
to use.TransactionInterceptorBuilder
public ImapIdleChannelAdapterSpec transactional()
TransactionInterceptor
Advice
with default
PlatformTransactionManager
and DefaultTransactionAttribute
for the
downstream flow.public ImapIdleChannelAdapterSpec sendingTaskExecutor(java.util.concurrent.Executor sendingTaskExecutor)
sendingTaskExecutor
- the sendingTaskExecutor.ImapIdleChannelAdapter.setSendingTaskExecutor(Executor)
public ImapIdleChannelAdapterSpec shouldReconnectAutomatically(boolean shouldReconnectAutomatically)
shouldReconnectAutomatically
- the shouldReconnectAutomatically.ImapIdleChannelAdapter.setShouldReconnectAutomatically(boolean)
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration