public class ReactiveStreamsConsumer extends AbstractEndpoint implements IntegrationConsumer
AbstractEndpoint
implementation for Reactive Streams subscription into an
input channel and reactive consumption of messages from that channel.lifecycleCondition, lifecycleLock
EXPRESSION_PARSER, logger
DEFAULT_PHASE
Constructor and Description |
---|
ReactiveStreamsConsumer(MessageChannel inputChannel,
MessageHandler messageHandler) |
ReactiveStreamsConsumer(MessageChannel inputChannel,
ReactiveMessageHandler reactiveMessageHandler)
Instantiate an endpoint based on the provided
MessageChannel and ReactiveMessageHandler . |
ReactiveStreamsConsumer(MessageChannel inputChannel,
org.reactivestreams.Subscriber<Message<?>> subscriber) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
MessageHandler |
getHandler()
Return the consumer's handler.
|
MessageChannel |
getInputChannel()
Return the input channel.
|
MessageChannel |
getOutputChannel()
Return the output channel (may be null).
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setErrorHandler(ErrorHandler errorHandler) |
destroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
afterPropertiesSet, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBeanName, getComponentName, getComponentType
public ReactiveStreamsConsumer(MessageChannel inputChannel, MessageHandler messageHandler)
public ReactiveStreamsConsumer(MessageChannel inputChannel, org.reactivestreams.Subscriber<Message<?>> subscriber)
public ReactiveStreamsConsumer(MessageChannel inputChannel, ReactiveMessageHandler reactiveMessageHandler)
MessageChannel
and ReactiveMessageHandler
.inputChannel
- the channel to consume in reactive manner.reactiveMessageHandler
- the ReactiveMessageHandler
to process messages.public void setErrorHandler(ErrorHandler errorHandler)
public MessageChannel getInputChannel()
IntegrationConsumer
getInputChannel
in interface IntegrationConsumer
public MessageChannel getOutputChannel()
IntegrationConsumer
getOutputChannel
in interface IntegrationConsumer
public MessageHandler getHandler()
IntegrationConsumer
getHandler
in interface IntegrationConsumer
protected void onInit()
IntegrationObjectSupport
onInit
in class AbstractEndpoint
protected void doStart()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStart
in class AbstractEndpoint
protected void doStop()
AbstractEndpoint
AbstractEndpoint.lifecycleLock
.doStop
in class AbstractEndpoint