Class MessageMappingMessageHandler

java.lang.Object
org.springframework.messaging.handler.invocation.reactive.AbstractMethodMessageHandler<CompositeMessageCondition>
org.springframework.messaging.handler.annotation.reactive.MessageMappingMessageHandler
All Implemented Interfaces:
Aware, BeanNameAware, InitializingBean, ApplicationContextAware, EmbeddedValueResolverAware, ReactiveMessageHandler
Direct Known Subclasses:
RSocketMessageHandler

public class MessageMappingMessageHandler extends AbstractMethodMessageHandler<CompositeMessageCondition> implements EmbeddedValueResolverAware
Extension of AbstractMethodMessageHandler for reactive, non-blocking handling of messages via @MessageMapping methods. By default, such methods are detected in @Controller Spring beans but that can be changed via AbstractMethodMessageHandler.setHandlerPredicate(Predicate).

Payloads for incoming messages are decoded through the configured setDecoders(List) decoders, with the help of PayloadMethodArgumentResolver.

There is no default handling for return values but AbstractMethodMessageHandler.setReturnValueHandlerConfigurer(org.springframework.messaging.handler.invocation.reactive.ReturnValueHandlerConfigurer) can be used to configure custom return value handlers. Subclasses may also override initReturnValueHandlers() to set up default return value handlers.

Since:
5.2
Author:
Rossen Stoyanchev
See Also: