Class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S,H>, H extends MessageHandler> 
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S, reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, H>>
org.springframework.integration.dsl.EndpointSpec<S, ConsumerEndpointFactoryBean, H>
org.springframework.integration.dsl.ConsumerEndpointSpec<S,H> 
- Type Parameters:
- S- the target- ConsumerEndpointSpecimplementation type.
- H- the target- MessageHandlerimplementation type.
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, H>>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
- Direct Known Subclasses:
- AbstractRouterSpec,- BarrierSpec,- CorrelationHandlerSpec,- DelayerEndpointSpec,- EnricherSpec,- FilterEndpointSpec,- GatewayEndpointSpec,- GenericEndpointSpec,- HeaderEnricherSpec,- HeaderFilterSpec,- ScatterGatherSpec,- SplitterSpec,- TransformerEndpointSpec
public abstract class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S,H>, H extends MessageHandler> 
extends EndpointSpec<S, ConsumerEndpointFactoryBean, H>
A 
EndpointSpec for consumer endpoints.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
- 
Field SummaryFieldsFields inherited from class org.springframework.integration.dsl.EndpointSpeccomponentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionConfigure a list ofAdviceobjects to be applied, in nested order, to the endpoint's handler.async(boolean async) Allow async replies.autoStartup(boolean autoStartup) <T,V> S customizeMonoReply(BiFunction<Message<?>, reactor.core.publisher.Mono<T>, org.reactivestreams.Publisher<V>> replyCustomizer) protected reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, H> doGet()handleMessageAdvice(MethodInterceptor... interceptors) Configure a list ofMethodInterceptorobjects to be applied, in nested order, to the endpoint's handler.notPropagatedHeaders(String... headerPatterns) Set header patterns ("xxx*", "*xxx", "*xxx*" or "xxx*yyy") that will NOT be copied from the inbound message.order(int order) phase(int phase) poller(PollerMetadata pollerMetadata) reactive()Make the consumer endpoint as reactive independently of an input channel.reactive(Function<? super reactor.core.publisher.Flux<Message<?>>, ? extends org.reactivestreams.Publisher<Message<?>>> reactiveCustomizer) Make the consumer endpoint as reactive independently of an input channel and apply the provided function into theFlux.transform(Function)operator.requiresReply(boolean requiresReply) Specify the role for the endpoint.sendTimeout(long sendTimeout) taskScheduler(TaskScheduler taskScheduler) Configure aTaskSchedulerfor scheduling tasks, for example in the Polling Consumer.Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor theMessageHandler.transactional(boolean handleMessageAdvice) Specify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor theMessageHandler.transactional(TransactionInterceptor transactionInterceptor) transactional(TransactionManager transactionManager) Specify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.transactional(TransactionManager transactionManager, boolean handleMessageAdvice) Specify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.Methods inherited from class org.springframework.integration.dsl.EndpointSpecassertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Field Details- 
adviceChain
 
- 
- 
Constructor Details- 
ConsumerEndpointSpec
 
- 
- 
Method Details- 
phase- Specified by:
- phasein class- EndpointSpec<S extends ConsumerEndpointSpec<S,- H>, ConsumerEndpointFactoryBean, H extends MessageHandler> 
- Parameters:
- phase- the phase.
- Returns:
- the endpoint spec.
- See Also:
 
- 
autoStartup- Specified by:
- autoStartupin class- EndpointSpec<S extends ConsumerEndpointSpec<S,- H>, ConsumerEndpointFactoryBean, H extends MessageHandler> 
- Parameters:
- autoStartup- the autoStartup.
- Returns:
- the endpoint spec
- See Also:
 
- 
poller- Specified by:
- pollerin class- EndpointSpec<S extends ConsumerEndpointSpec<S,- H>, ConsumerEndpointFactoryBean, H extends MessageHandler> 
- Parameters:
- pollerMetadata- the pollerMetadata
- Returns:
- the endpoint spec.
- See Also:
 
- 
reactiveMake the consumer endpoint as reactive independently of an input channel.- Returns:
- the spec
- Since:
- 5.5
 
- 
reactivepublic S reactive(Function<? super reactor.core.publisher.Flux<Message<?>>, ? extends org.reactivestreams.Publisher<Message<?>>> reactiveCustomizer) Make the consumer endpoint as reactive independently of an input channel and apply the provided function into theFlux.transform(Function)operator.- Parameters:
- reactiveCustomizer- the function to transform- Fluxfor the input channel.
- Returns:
- the spec
- Since:
- 5.5
 
- 
roleDescription copied from class:EndpointSpecSpecify the role for the endpoint. Such endpoints can be started/stopped as a group.- Specified by:
- rolein class- EndpointSpec<S extends ConsumerEndpointSpec<S,- H>, ConsumerEndpointFactoryBean, H extends MessageHandler> 
- Parameters:
- role- the role for this endpoint.
- Returns:
- the endpoint spec
- See Also:
 
- 
taskSchedulerConfigure aTaskSchedulerfor scheduling tasks, for example in the Polling Consumer. By default, the globalThreadPoolTaskSchedulerbean is used. This configuration is useful when there are requirements to dedicate particular threads for polling task, for example.- Parameters:
- taskScheduler- the- TaskSchedulerto use.
- Returns:
- the endpoint spec.
- See Also:
 
- 
handleMessageAdviceConfigure a list ofMethodInterceptorobjects to be applied, in nested order, to the endpoint's handler. The advice objects are applied to thehandleMessage()method and therefore to the whole sub-flow afterward.- Parameters:
- interceptors- the advice chain.
- Returns:
- the endpoint spec.
- Since:
- 5.3
 
- 
advice
- 
transactionalSpecify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.- Parameters:
- transactionManager- the- TransactionManagerto use.
- Returns:
- the spec.
 
- 
transactionalSpecify aTransactionInterceptorAdvicewith the providedPlatformTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.- Parameters:
- transactionManager- the- TransactionManagerto use.
- handleMessageAdvice- the flag to indicate the target- Advicetype:- false- regular- TransactionInterceptor;- true-- TransactionHandleMessageAdviceextension.
- Returns:
- the spec.
 
- 
transactional- Parameters:
- transactionInterceptor- the- TransactionInterceptorto use.
- Returns:
- the spec.
- See Also:
 
- 
transactionalSpecify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor theMessageHandler.- Returns:
- the spec.
 
- 
transactionalSpecify aTransactionInterceptorAdvicewith defaultPlatformTransactionManagerandDefaultTransactionAttributefor theMessageHandler.- Parameters:
- handleMessageAdvice- the flag to indicate the target- Advicetype:- false- regular- TransactionInterceptor;- true-- TransactionHandleMessageAdviceextension.
- Returns:
- the spec.
 
- 
customizeMonoReplypublic <T,V> S customizeMonoReply(BiFunction<Message<?>, reactor.core.publisher.Mono<T>, org.reactivestreams.Publisher<V>> replyCustomizer) - Type Parameters:
- T- inbound reply payload.
- V- outbound reply payload.
- Parameters:
- replyCustomizer- the- BiFunctionto propagate into- ReactiveRequestHandlerAdvice.
- Returns:
- the spec.
- Since:
- 5.3
- See Also:
 
- 
requiresReply- Parameters:
- requiresReply- the requiresReply.
- Returns:
- the endpoint spec.
- See Also:
 
- 
sendTimeout- Parameters:
- sendTimeout- the send timeout.
- Returns:
- the endpoint spec.
- See Also:
 
- 
order- Parameters:
- order- the order.
- Returns:
- the endpoint spec.
- See Also:
 
- 
asyncAllow async replies. If the handler reply is aCompletableFuture, send the output when it is satisfied rather than sending the future as the result. Ignored for handler return types other thanCompletableFuture.- Parameters:
- async- true to allow.
- Returns:
- the endpoint spec.
- See Also:
 
- 
notPropagatedHeadersSet header patterns ("xxx*", "*xxx", "*xxx*" or "xxx*yyy") that will NOT be copied from the inbound message. At least one pattern as "*" means do not copy headers at all.- Parameters:
- headerPatterns- the headers to not propagate from the inbound message.
- Returns:
- the endpoint spec.
- See Also:
 
- 
doGet- Overrides:
- doGetin class- EndpointSpec<S extends ConsumerEndpointSpec<S,- H>, ConsumerEndpointFactoryBean, H extends MessageHandler> 
 
 
-