Class PollerSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<PollerSpec,PollerMetadata>
org.springframework.integration.dsl.PollerSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,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
PARSER, target
-
Method Summary
Modifier and Type Method Description PollerSpec
advice(Advice... advice)
Specify AOPAdvice
s for thepollingTask
.PollerSpec
errorChannel(String errorChannelName)
Specify a bean name for theMessageChannel
to use for sending error message in case of polling failures.PollerSpec
errorChannel(MessageChannel errorChannel)
Specify aMessageChannel
to use for sending error message in case of polling failures.PollerSpec
errorHandler(ErrorHandler errorHandler)
Map<Object,String>
getComponentsToRegister()
PollerSpec
maxMessagesPerPoll(long maxMessagesPerPoll)
PollerSpec
receiveTimeout(long receiveTimeout)
Specify a timeout in milliseconds to wait for a message in theMessageChannel
.PollerSpec
sendTimeout(long sendTimeout)
PollerSpec
taskExecutor(Executor taskExecutor)
Specify anExecutor
to perform thepollingTask
.PollerSpec
transactional()
Specify aTransactionInterceptor
Advice
with defaultPlatformTransactionManager
andDefaultTransactionAttribute
for thepollingTask
.PollerSpec
transactional(TransactionInterceptor transactionInterceptor)
PollerSpec
transactional(TransactionManager transactionManager)
Specify aTransactionInterceptor
Advice
with the providedPlatformTransactionManager
and defaultDefaultTransactionAttribute
for thepollingTask
.PollerSpec
transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
Specify theTransactionSynchronizationFactory
to attach aTransactionSynchronization
to the transaction aroundpoll
operation.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
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:
taskExecutor(Executor)
-
errorChannel
Specify aMessageChannel
to use for sending error message in case of polling failures.- Parameters:
errorChannel
- theMessageChannel
to use.- Returns:
- the spec.
- See Also:
MessagePublishingErrorHandler
-
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:
MessagePublishingErrorHandler
-
maxMessagesPerPoll
- Parameters:
maxMessagesPerPoll
- the maxMessagesPerPoll to set.- Returns:
- the spec.
- See Also:
PollerMetadata.setMaxMessagesPerPoll(long)
-
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:
PollableChannel.receive(long)
-
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:
TransactionInterceptorBuilder
-
taskExecutor
Specify anExecutor
to perform thepollingTask
.- Parameters:
taskExecutor
- theExecutor
to use.- Returns:
- the spec.
-
sendTimeout
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-