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:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<PollerMetadata>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,ComponentsRegistration
public final class PollerSpec extends IntegrationComponentSpec<PollerSpec,PollerMetadata> implements ComponentsRegistration
An
IntegrationComponentSpec for PollerMetadatas.- Since:
- 5.0
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target -
Method Summary
Modifier and Type Method Description PollerSpecadvice(org.aopalliance.aop.Advice... advice)Specify AOPAdvices for thepollingTask.PollerSpecerrorChannel(java.lang.String errorChannelName)Specify a bean name for theMessageChannelto use for sending error message in case of polling failures.PollerSpecerrorChannel(org.springframework.messaging.MessageChannel errorChannel)Specify aMessageChannelto use for sending error message in case of polling failures.PollerSpecerrorHandler(org.springframework.util.ErrorHandler errorHandler)java.util.Map<java.lang.Object,java.lang.String>getComponentsToRegister()PollerSpecmaxMessagesPerPoll(long maxMessagesPerPoll)PollerSpecreceiveTimeout(long receiveTimeout)Specify a timeout in milliseconds to wait for a message in theMessageChannel.PollerSpecsendTimeout(long sendTimeout)PollerSpectaskExecutor(java.util.concurrent.Executor taskExecutor)Specify anExecutorto perform thepollingTask.PollerSpectransactional()Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor thepollingTask.PollerSpectransactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)Specify aTransactionInterceptorAdvicefor thepollingTask.PollerSpectransactional(org.springframework.transaction.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, stop
-
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
public PollerSpec transactional(org.springframework.transaction.TransactionManager transactionManager)Specify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor thepollingTask.- Parameters:
transactionManager- theTransactionManagerto use.- Returns:
- the spec.
-
transactional
Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor thepollingTask.- Returns:
- the spec.
-
transactional
public PollerSpec transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)Specify aTransactionInterceptorAdvicefor thepollingTask.- Parameters:
transactionInterceptor- theTransactionInterceptorto use.- Returns:
- the spec.
- See Also:
TransactionInterceptorBuilder
-
taskExecutor
Specify anExecutorto perform thepollingTask.- Parameters:
taskExecutor- theExecutorto use.- Returns:
- the spec.
-
sendTimeout
-
getComponentsToRegister
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration
-