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, targetFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Method Summary
Modifier and TypeMethodDescriptionadvice(org.aopalliance.aop.Advice... advice) Specify AOPAdvices for thepollingTask.errorChannel(String errorChannelName) Specify a bean name for theMessageChannelto use for sending error message in case of polling failures.errorChannel(org.springframework.messaging.MessageChannel errorChannel) Specify aMessageChannelto use for sending error message in case of polling failures.errorHandler(org.springframework.util.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 anExecutorto perform thepollingTask.Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor thepollingTask.transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor) Specify aTransactionInterceptorAdvicefor thepollingTask.transactional(org.springframework.transaction.TransactionManager transactionManager) Specify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor thepollingTask.transactionSynchronizationFactory(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:
-
errorChannel
Specify aMessageChannelto use for sending error message in case of polling failures.- Parameters:
errorChannel- theMessageChannelto use.- Returns:
- the spec.
- See Also:
-
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:
-
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:
-
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:
-
taskExecutor
Specify anExecutorto perform thepollingTask.- Parameters:
taskExecutor- theExecutorto use.- Returns:
- the spec.
-
sendTimeout
-
getComponentsToRegister
- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration
-