public final class PollerSpec extends IntegrationComponentSpec<PollerSpec,PollerMetadata> implements ComponentsRegistration
IntegrationComponentSpec
for PollerMetadata
s.PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier and Type | Method and Description |
---|---|
PollerSpec |
advice(Advice... advice)
Specify AOP
Advice s for the pollingTask . |
PollerSpec |
errorChannel(MessageChannel errorChannel)
Specify a
MessageChannel to use for sending error message in case
of polling failures. |
PollerSpec |
errorChannel(String errorChannelName)
Specify a bean name for the
MessageChannel 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 the
MessageChannel . |
PollerSpec |
sendTimeout(long sendTimeout) |
PollerSpec |
taskExecutor(Executor taskExecutor)
Specify an
Executor to perform the pollingTask . |
PollerSpec |
transactional()
Specify a
TransactionInterceptor Advice with default
PlatformTransactionManager and
DefaultTransactionAttribute for
the pollingTask . |
PollerSpec |
transactional(TransactionInterceptor transactionInterceptor)
|
PollerSpec |
transactional(TransactionManager transactionManager)
Specify a
TransactionInterceptor Advice with the
provided PlatformTransactionManager and default
DefaultTransactionAttribute
for the pollingTask . |
PollerSpec |
transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
Specify the
TransactionSynchronizationFactory to attach a
TransactionSynchronization
to the transaction around poll operation. |
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
public PollerSpec transactionSynchronizationFactory(TransactionSynchronizationFactory transactionSynchronizationFactory)
TransactionSynchronizationFactory
to attach a
TransactionSynchronization
to the transaction around poll
operation.transactionSynchronizationFactory
- the TransactionSynchronizationFactory to use.public PollerSpec errorHandler(ErrorHandler errorHandler)
errorHandler
- the ErrorHandler
to use.taskExecutor(Executor)
public PollerSpec errorChannel(MessageChannel errorChannel)
MessageChannel
to use for sending error message in case
of polling failures.errorChannel
- the MessageChannel
to use.MessagePublishingErrorHandler
public PollerSpec errorChannel(String errorChannelName)
MessageChannel
to use for sending error message in case
of polling failures.errorChannelName
- the bean name for MessageChannel
to use.MessagePublishingErrorHandler
public PollerSpec maxMessagesPerPoll(long maxMessagesPerPoll)
maxMessagesPerPoll
- the maxMessagesPerPoll to set.PollerMetadata.setMaxMessagesPerPoll(long)
public PollerSpec receiveTimeout(long receiveTimeout)
MessageChannel
.
Defaults to 1000
.receiveTimeout
- the timeout to use.PollableChannel.receive(long)
public PollerSpec advice(Advice... advice)
Advice
s for the pollingTask
.advice
- the Advice
s to use.public PollerSpec transactional(TransactionManager transactionManager)
TransactionInterceptor
Advice
with the
provided PlatformTransactionManager
and default
DefaultTransactionAttribute
for the pollingTask
.transactionManager
- the TransactionManager
to use.public PollerSpec transactional()
TransactionInterceptor
Advice
with default
PlatformTransactionManager
and
DefaultTransactionAttribute
for
the pollingTask
.public PollerSpec transactional(TransactionInterceptor transactionInterceptor)
transactionInterceptor
- the TransactionInterceptor
to use.TransactionInterceptorBuilder
public PollerSpec taskExecutor(Executor taskExecutor)
Executor
to perform the pollingTask
.taskExecutor
- the Executor
to use.public PollerSpec sendTimeout(long sendTimeout)
public Map<Object,String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration