More docs for new RSocket features

This commit is contained in:
Artem Bilan
2019-11-01 15:48:44 -04:00
committed by Gary Russell
parent dd1d65bb23
commit 3e68228ae3
4 changed files with 84 additions and 15 deletions

View File

@@ -74,6 +74,11 @@ public void onApplicationEvent(RSocketConnectedEvent event) {
All the options, including `RSocketStrategies` bean and `@EventListener` for `RSocketConnectedEvent`, are optional.
See `ServerRSocketConnector` JavaDocs for more information.
Starting with version 5.2.1, the `ServerRSocketMessageHandler` is extracted to a public, top-level class for possible connection with an existing RSocket server.
When a `ServerRSocketConnector` is supplied with an external instance of `ServerRSocketMessageHandler`, it doesn't create an RSocket server internally and just delegates all the handling logic to the provided instance.
In addition the `ServerRSocketMessageHandler` can be configured with a `messageMappingCompatible` flag to handle also `@MessageMapping` for an RSocket controller, fully replacing the functionality provided by the standard `RSocketMessageHandler`.
This can be useful in mixed configurations, when classic `@MessageMapping` methods are present in the same application along with RSocket channel adapters and an externally configured RSocket server is present in the application.
The `ClientRSocketConnector` serves as a holder for `RSocketRequester` based on the `RSocket` connected via the provided `ClientTransport`.
The `RSocketFactory.ClientRSocketFactory` can be customized with the provided `ClientRSocketFactoryConfigurer`.
The `setupRoute` (with optional templates variables) and `setupData` with metadata can be also configured on this component.