Class ReactiveStreamsConsumer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.ReactiveStreamsConsumer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- Lifecycle,- Phased,- SmartLifecycle,- ExpressionCapable,- IntegrationConsumer,- NamedComponent,- ManageableLifecycle,- ManageableSmartLifecycle
public class ReactiveStreamsConsumer extends AbstractEndpoint implements IntegrationConsumer
An 
AbstractEndpoint implementation for Reactive Streams subscription into an
 input channel and reactive consumption of messages from that channel.- Since:
- 5.0
- Author:
- Artem Bilan, Trung Pham
- 
Field SummaryFields inherited from class org.springframework.integration.endpoint.AbstractEndpointlifecycleCondition, lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructors Constructor Description ReactiveStreamsConsumer(MessageChannel inputChannel, org.reactivestreams.Subscriber<Message<?>> subscriber)ReactiveStreamsConsumer(MessageChannel inputChannel, MessageHandler messageHandler)ReactiveStreamsConsumer(MessageChannel inputChannel, ReactiveMessageHandler reactiveMessageHandler)Instantiate an endpoint based on the providedMessageChannelandReactiveMessageHandler.
- 
Method SummaryModifier and Type Method Description protected voiddoStart()Subclasses must implement this method with the start behavior.protected voiddoStop()Subclasses must implement this method with the stop behavior.MessageHandlergetHandler()Return the consumer's handler.MessageChannelgetInputChannel()Return the input channel.MessageChannelgetOutputChannel()Return the output channel (may be null).protected voidonInit()Subclasses may implement this for initialization logic.voidsetErrorHandler(ErrorHandler errorHandler)voidsetReactiveCustomizer(Function<? super reactor.core.publisher.Flux<Message<?>>,? extends org.reactivestreams.Publisher<Message<?>>> reactiveCustomizer)Methods inherited from class org.springframework.integration.endpoint.AbstractEndpointdestroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName, getComponentType
- 
Constructor Details- 
ReactiveStreamsConsumer
- 
ReactiveStreamsConsumerpublic ReactiveStreamsConsumer(MessageChannel inputChannel, org.reactivestreams.Subscriber<Message<?>> subscriber)
- 
ReactiveStreamsConsumerpublic ReactiveStreamsConsumer(MessageChannel inputChannel, ReactiveMessageHandler reactiveMessageHandler)Instantiate an endpoint based on the providedMessageChannelandReactiveMessageHandler.- Parameters:
- inputChannel- the channel to consume in reactive manner.
- reactiveMessageHandler- the- ReactiveMessageHandlerto process messages.
- Since:
- 5.3
 
 
- 
- 
Method Details- 
setErrorHandler
- 
setReactiveCustomizer
- 
getInputChannelDescription copied from interface:IntegrationConsumerReturn the input channel.- Specified by:
- getInputChannelin interface- IntegrationConsumer
- Returns:
- the input channel.
 
- 
getOutputChannelDescription copied from interface:IntegrationConsumerReturn the output channel (may be null).- Specified by:
- getOutputChannelin interface- IntegrationConsumer
- Returns:
- the output channel.
 
- 
getHandlerDescription copied from interface:IntegrationConsumerReturn the consumer's handler.- Specified by:
- getHandlerin interface- IntegrationConsumer
- Returns:
- the handler.
 
- 
onInitprotected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
- onInitin class- AbstractEndpoint
 
- 
doStartprotected void doStart()Description copied from class:AbstractEndpointSubclasses must implement this method with the start behavior. This method will be invoked while holding theAbstractEndpoint.lifecycleLock.- Specified by:
- doStartin class- AbstractEndpoint
 
- 
doStopprotected void doStop()Description copied from class:AbstractEndpointSubclasses must implement this method with the stop behavior. This method will be invoked while holding theAbstractEndpoint.lifecycleLock.- Specified by:
- doStopin class- AbstractEndpoint
 
 
-