Class PollerSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<PollerSpec,PollerMetadata>
org.springframework.integration.dsl.PollerSpec
- All Implemented Interfaces:
DisposableBean
,FactoryBean<PollerMetadata>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public final class PollerSpec
extends IntegrationComponentSpec<PollerSpec,PollerMetadata>
implements ComponentsRegistration
An
IntegrationComponentSpec
for PollerMetadata
s.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Method Summary
Modifier and TypeMethodDescriptionSpecify AOPAdvice
s for thepollingTask
.errorChannel
(String errorChannelName) Specify a bean name for theMessageChannel
to use for sending error message in case of polling failures.errorChannel
(MessageChannel errorChannel) Specify aMessageChannel
to use for sending error message in case of polling failures.errorHandler
(ErrorHandler errorHandler) maxMessagesPerPoll
(long maxMessagesPerPoll) receiveTimeout
(long receiveTimeout) Specify a timeout in milliseconds to wait for a message in theMessageChannel
.sendTimeout
(long sendTimeout) taskExecutor
(Executor taskExecutor) Specify anExecutor
to perform thepollingTask
.Specify aTransactionInterceptor
Advice
with defaultPlatformTransactionManager
andDefaultTransactionAttribute
for thepollingTask
.transactional
(TransactionInterceptor transactionInterceptor) transactional
(TransactionManager transactionManager) Specify aTransactionInterceptor
Advice
with the providedPlatformTransactionManager
and defaultDefaultTransactionAttribute
for thepollingTask
.transactionSynchronizationFactory
(TransactionSynchronizationFactory transactionSynchronizationFactory) Specify theTransactionSynchronizationFactory
to attach aTransactionSynchronization
to the transaction aroundpoll
operation.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Method Details
-
transactionSynchronizationFactory
public PollerSpec transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory) Specify theTransactionSynchronizationFactory
to attach aTransactionSynchronization
to the transaction aroundpoll
operation.- Parameters:
transactionSynchronizationFactory
- the TransactionSynchronizationFactory to use.- Returns:
- the spec.
-
errorHandler
- Parameters:
errorHandler
- theErrorHandler
to use.- Returns:
- the spec.
- See Also:
-
errorChannel
Specify aMessageChannel
to use for sending error message in case of polling failures.- Parameters:
errorChannel
- theMessageChannel
to use.- Returns:
- the spec.
- See Also:
-
errorChannel
Specify a bean name for theMessageChannel
to use for sending error message in case of polling failures.- Parameters:
errorChannelName
- the bean name forMessageChannel
to use.- Returns:
- the spec.
- See Also:
-
maxMessagesPerPoll
- Parameters:
maxMessagesPerPoll
- the maxMessagesPerPoll to set.- Returns:
- the spec.
- See Also:
-
receiveTimeout
Specify a timeout in milliseconds to wait for a message in theMessageChannel
. Defaults to1000
.- Parameters:
receiveTimeout
- the timeout to use.- Returns:
- the spec.
- See Also:
-
advice
Specify AOPAdvice
s for thepollingTask
.- Parameters:
advice
- theAdvice
s to use.- Returns:
- the spec.
-
transactional
Specify aTransactionInterceptor
Advice
with the providedPlatformTransactionManager
and defaultDefaultTransactionAttribute
for thepollingTask
.- Parameters:
transactionManager
- theTransactionManager
to use.- Returns:
- the spec.
-
transactional
Specify aTransactionInterceptor
Advice
with defaultPlatformTransactionManager
andDefaultTransactionAttribute
for thepollingTask
.- Returns:
- the spec.
-
transactional
- Parameters:
transactionInterceptor
- theTransactionInterceptor
to use.- Returns:
- the spec.
- See Also:
-
taskExecutor
Specify anExecutor
to perform thepollingTask
.- Parameters:
taskExecutor
- theExecutor
to use.- Returns:
- the spec.
-
sendTimeout
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-