S
- the target ConsumerEndpointSpec
implementation type.H
- the target MessageHandler
implementation type.public abstract class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S,H>,H extends org.springframework.messaging.MessageHandler> extends EndpointSpec<S,org.springframework.integration.config.ConsumerEndpointFactoryBean,H>
EndpointSpec
for consumer endpoints.Modifier and Type | Field and Description |
---|---|
protected java.util.List<org.aopalliance.aop.Advice> |
adviceChain |
componentToRegister, endpointFactoryBean, handler
logger, PARSER, target
Modifier | Constructor and Description |
---|---|
protected |
ConsumerEndpointSpec(H messageHandler) |
Modifier and Type | Method and Description |
---|---|
S |
advice(org.aopalliance.aop.Advice... advice)
Configure a list of
Advice objects to be applied, in nested order, to the endpoint's handler. |
S |
async(boolean async)
Allow async replies.
|
S |
autoStartup(boolean autoStartup) |
S |
order(int order) |
S |
phase(int phase) |
S |
poller(org.springframework.integration.scheduling.PollerMetadata pollerMetadata) |
S |
requiresReply(boolean requiresReply) |
S |
sendTimeout(long sendTimeout) |
S |
transactional()
Specify a
TransactionInterceptor Advice with default PlatformTransactionManager
and DefaultTransactionAttribute for the pollingTask . |
S |
transactional(boolean handleMessageAdvice)
Specify a
TransactionInterceptor Advice with default PlatformTransactionManager
and DefaultTransactionAttribute for the pollingTask . |
S |
transactional(org.springframework.transaction.PlatformTransactionManager transactionManager)
Specify a
TransactionInterceptor Advice with the
provided PlatformTransactionManager and default DefaultTransactionAttribute
for the pollingTask . |
S |
transactional(org.springframework.transaction.PlatformTransactionManager transactionManager,
boolean handleMessageAdvice)
Specify a
TransactionInterceptor Advice with the
provided PlatformTransactionManager and default DefaultTransactionAttribute
for the pollingTask . |
S |
transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)
Specify a
TransactionInterceptor Advice for the pollingTask . |
assertHandler, doGet, getComponentsToRegister, id, poller, poller
_this, get, getId, getObject, getObjectType, isSingleton
protected ConsumerEndpointSpec(H messageHandler)
public S phase(int phase)
phase
in class EndpointSpec<S extends ConsumerEndpointSpec<S,H>,org.springframework.integration.config.ConsumerEndpointFactoryBean,H extends org.springframework.messaging.MessageHandler>
phase
- the phase.SmartLifecycle
public S autoStartup(boolean autoStartup)
autoStartup
in class EndpointSpec<S extends ConsumerEndpointSpec<S,H>,org.springframework.integration.config.ConsumerEndpointFactoryBean,H extends org.springframework.messaging.MessageHandler>
autoStartup
- the autoStartup.SmartLifecycle
public S poller(org.springframework.integration.scheduling.PollerMetadata pollerMetadata)
poller
in class EndpointSpec<S extends ConsumerEndpointSpec<S,H>,org.springframework.integration.config.ConsumerEndpointFactoryBean,H extends org.springframework.messaging.MessageHandler>
pollerMetadata
- the pollerMetadataAbstractPollingEndpoint
public S advice(org.aopalliance.aop.Advice... advice)
Advice
objects to be applied, in nested order, to the endpoint's handler.
The advice objects are applied only to the handler.advice
- the advice chain.public S transactional(org.springframework.transaction.PlatformTransactionManager transactionManager)
TransactionInterceptor
Advice
with the
provided PlatformTransactionManager
and default DefaultTransactionAttribute
for the pollingTask
.transactionManager
- the PlatformTransactionManager
to use.public S transactional(org.springframework.transaction.PlatformTransactionManager transactionManager, boolean handleMessageAdvice)
TransactionInterceptor
Advice
with the
provided PlatformTransactionManager
and default DefaultTransactionAttribute
for the pollingTask
.transactionManager
- the PlatformTransactionManager
to use.handleMessageAdvice
- the flag to indicate the target Advice
type:
false
- regular TransactionInterceptor
;
true
- TransactionHandleMessageAdvice
extension.public S transactional(org.springframework.transaction.interceptor.TransactionInterceptor transactionInterceptor)
TransactionInterceptor
Advice
for the pollingTask
.transactionInterceptor
- the TransactionInterceptor
to use.TransactionInterceptorBuilder
public S transactional()
TransactionInterceptor
Advice
with default PlatformTransactionManager
and DefaultTransactionAttribute
for the pollingTask
.public S transactional(boolean handleMessageAdvice)
TransactionInterceptor
Advice
with default PlatformTransactionManager
and DefaultTransactionAttribute
for the pollingTask
.handleMessageAdvice
- the flag to indicate the target Advice
type:
false
- regular TransactionInterceptor
;
true
- TransactionHandleMessageAdvice
extension.public S requiresReply(boolean requiresReply)
requiresReply
- the requiresReply.AbstractReplyProducingMessageHandler.setRequiresReply(boolean)
public S sendTimeout(long sendTimeout)
sendTimeout
- the send timeout.AbstractMessageProducingHandler.setSendTimeout(long)
public S order(int order)
order
- the order.AbstractMessageHandler.setOrder(int)
public S async(boolean async)
ListenableFuture
send
the output when it is satisfied rather than sending the future as the result.
Only subclasses that support this feature should set it.async
- true to allow.AbstractMessageProducingHandler.setAsync(boolean)