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 PollerMetadatas.- 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 PollerSpecadvice(Advice... advice)Specify AOPAdvices for thepollingTask.PollerSpecerrorChannel(String errorChannelName)Specify a bean name for theMessageChannelto use for sending error message in case of polling failures.PollerSpecerrorChannel(MessageChannel errorChannel)Specify aMessageChannelto use for sending error message in case of polling failures.PollerSpecerrorHandler(ErrorHandler errorHandler)Map<Object,String>getComponentsToRegister()PollerSpecmaxMessagesPerPoll(long maxMessagesPerPoll)PollerSpecreceiveTimeout(long receiveTimeout)Specify a timeout in milliseconds to wait for a message in theMessageChannel.PollerSpecsendTimeout(long sendTimeout)PollerSpectaskExecutor(Executor taskExecutor)Specify anExecutorto perform thepollingTask.PollerSpectransactional()Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor thepollingTask.PollerSpectransactional(TransactionInterceptor transactionInterceptor)PollerSpectransactional(TransactionManager transactionManager)Specify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor thepollingTask.PollerSpectransactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)Specify theTransactionSynchronizationFactoryto attach aTransactionSynchronizationto the transaction aroundpolloperation.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods 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 theTransactionSynchronizationFactoryto attach aTransactionSynchronizationto the transaction aroundpolloperation.- Parameters:
transactionSynchronizationFactory- the TransactionSynchronizationFactory to use.- Returns:
- the spec.
-
errorHandler
- Parameters:
errorHandler- theErrorHandlerto use.- Returns:
- the spec.
- See Also:
taskExecutor(Executor)
-
errorChannel
Specify aMessageChannelto use for sending error message in case of polling failures.- Parameters:
errorChannel- theMessageChannelto use.- Returns:
- the spec.
- See Also:
MessagePublishingErrorHandler
-
errorChannel
Specify a bean name for theMessageChannelto use for sending error message in case of polling failures.- Parameters:
errorChannelName- the bean name forMessageChannelto 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 AOPAdvices for thepollingTask.- Parameters:
advice- theAdvices to use.- Returns:
- the spec.
-
transactional
Specify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor thepollingTask.- Parameters:
transactionManager- theTransactionManagerto use.- Returns:
- the spec.
-
transactional
Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor thepollingTask.- Returns:
- the spec.
-
transactional
- Parameters:
transactionInterceptor- theTransactionInterceptorto use.- Returns:
- the spec.
- See Also:
TransactionInterceptorBuilder
-
taskExecutor
Specify anExecutorto perform thepollingTask.- Parameters:
taskExecutor- theExecutorto use.- Returns:
- the spec.
-
sendTimeout
-
getComponentsToRegister
- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration
-