Class ReactiveMessageHandlerAdapter

java.lang.Object
org.springframework.integration.handler.ReactiveMessageHandlerAdapter
All Implemented Interfaces:
MessageHandler

public class ReactiveMessageHandlerAdapter extends Object implements MessageHandler
A MessageHandler implementation to adapt a ReactiveMessageHandler for synchronous invocations. A subscription to the returned reactive type from ReactiveMessageHandler.handleMessage(Message) call is done directly in the handleMessage(org.springframework.messaging.Message<?>) implementation.

The framework wraps a target ReactiveMessageHandler into this instance automatically for XML and Annotation configuration. For Java DSL it is recommended to wrap for generic usage (.handle(MessageHandle)) or it has to be done in the MessageHandlerSpec implementation for protocol-specif ReactiveMessageHandler.

The framework unwraps a delegate ReactiveMessageHandler whenever it can compose reactive streams, e.g. ReactiveStreamsConsumer.

Since:
5.3
Author:
Artem Bilan
See Also: