public final class PollerSpec extends IntegrationComponentSpec<PollerSpec,PollerMetadata> implements ComponentsRegistration
IntegrationComponentSpec
for PollerMetadata
s.logger, PARSER, target
Modifier and Type | Method and Description |
---|---|
PollerSpec |
advice(org.aopalliance.aop.Advice... advice)
Specify AOP
Advice s for the pollingTask . |
PollerSpec |
errorChannel(org.springframework.messaging.MessageChannel errorChannel)
Specify a
MessageChannel to use for sending error message in case
of polling failures. |
PollerSpec |
errorChannel(java.lang.String errorChannelName)
Specify a bean name for the
MessageChannel to use for sending error message in case
of polling failures. |
PollerSpec |
errorHandler(org.springframework.util.ErrorHandler errorHandler)
|
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
PollerSpec |
maxMessagesPerPoll(long maxMessagesPerPoll) |
PollerSpec |
receiveTimeout(long receiveTimeout)
Specify a timeout in milliseconds to wait for a message in the
MessageChannel . |
PollerSpec |
sendTimeout(long sendTimeout) |
PollerSpec |
taskExecutor(java.util.concurrent.Executor taskExecutor)
Specify an
Executor to perform the pollingTask . |
PollerSpec |
transactional()
Specify a
TransactionInterceptor Advice with default PlatformTransactionManager
and DefaultTransactionAttribute for the pollingTask . |
PollerSpec |
transactional(org.springframework.transaction.PlatformTransactionManager transactionManager)
Specify a
TransactionInterceptor Advice with the
provided PlatformTransactionManager and default DefaultTransactionAttribute
for the pollingTask . |
PollerSpec |
transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)
Specify a
TransactionInterceptor Advice for the pollingTask . |
PollerSpec |
transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
Specify the
TransactionSynchronizationFactory to attach a
TransactionSynchronization
to the transaction around poll operation. |
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, id, isSingleton
public PollerSpec transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
TransactionSynchronizationFactory
to attach a
TransactionSynchronization
to the transaction around poll
operation.transactionSynchronizationFactory
- the TransactionSynchronizationFactory to use.public PollerSpec errorHandler(org.springframework.util.ErrorHandler errorHandler)
errorHandler
- the ErrorHandler
to use.taskExecutor(Executor)
public PollerSpec errorChannel(org.springframework.messaging.MessageChannel errorChannel)
MessageChannel
to use for sending error message in case
of polling failures.errorChannel
- the MessageChannel
to use.MessagePublishingErrorHandler
public PollerSpec errorChannel(java.lang.String errorChannelName)
MessageChannel
to use for sending error message in case
of polling failures.errorChannelName
- the bean name for MessageChannel
to use.MessagePublishingErrorHandler
public PollerSpec maxMessagesPerPoll(long maxMessagesPerPoll)
maxMessagesPerPoll
- the maxMessagesPerPoll to set.PollerMetadata.setMaxMessagesPerPoll(long)
public PollerSpec receiveTimeout(long receiveTimeout)
MessageChannel
.
Defaults to 1000
.receiveTimeout
- the timeout to use.PollableChannel.receive(long)
public PollerSpec advice(org.aopalliance.aop.Advice... advice)
Advice
s for the pollingTask
.advice
- the Advice
s to use.public PollerSpec transactional(org.springframework.transaction.PlatformTransactionManager transactionManager)
TransactionInterceptor
Advice
with the
provided PlatformTransactionManager
and default DefaultTransactionAttribute
for the pollingTask
.transactionManager
- the PlatformTransactionManager
to use.public PollerSpec transactional()
TransactionInterceptor
Advice
with default PlatformTransactionManager
and DefaultTransactionAttribute
for the pollingTask
.public PollerSpec transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)
TransactionInterceptor
Advice
for the pollingTask
.transactionInterceptor
- the TransactionInterceptor
to use.TransactionInterceptorBuilder
public PollerSpec taskExecutor(java.util.concurrent.Executor taskExecutor)
Executor
to perform the pollingTask
.taskExecutor
- the Executor
to use.public PollerSpec sendTimeout(long sendTimeout)
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration