Class RSocketMessageHandler

All Implemented Interfaces:
Aware, BeanNameAware, InitializingBean, ApplicationContextAware, EmbeddedValueResolverAware, ReactiveMessageHandler

public class RSocketMessageHandler extends MessageMappingMessageHandler
Extension of MessageMappingMessageHandler for handling RSocket requests with @ConnectMapping and @MessageMapping methods.

For server scenarios this class can be declared as a bean in Spring configuration and that would detect @MessageMapping methods in @Controller beans. What beans are checked can be changed through a handlerPredicate. Given an instance of this class, you can then use responder() to obtain a SocketAcceptor adapter to register with the RSocketServer.

For a client, possibly in the same process as a server, consider using the static factory method responder(RSocketStrategies, Object...) to obtain a client responder to be registered via RSocketRequester.Builder.

For @MessageMapping methods, this class automatically determines the RSocket interaction type based on the input and output cardinality of the method. See the "Annotated Responders" section of the Spring Framework reference for more details.

Since:
5.2
Author:
Rossen Stoyanchev