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 PollerMetadatas.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Method Summary
Modifier and TypeMethodDescriptionSpecify AOPAdvices for thepollingTask.errorChannel(String errorChannelName) Specify a bean name for theMessageChannelto use for sending error message in case of polling failures.errorChannel(MessageChannel errorChannel) Specify aMessageChannelto 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) Deprecated, for removal: This API element is subject to removal in a future version.taskExecutor(Executor taskExecutor) Specify anExecutorto perform thepollingTask.Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor thepollingTask.transactional(TransactionInterceptor transactionInterceptor) transactional(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, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
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:
-
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:
-
taskExecutor
Specify anExecutorto perform thepollingTask.- Parameters:
taskExecutor- theExecutorto use.- Returns:
- the spec.
-
sendTimeout
Deprecated, for removal: This API element is subject to removal in a future version.The timeout for blocking send on channels.- Parameters:
sendTimeout- the timeout to use.- Returns:
- the spec.
-
getComponentsToRegister
- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration
-
SourcePollingChannelAdapterSpec.sendTimeout(long)