fun radars(request: MapRequest): Flow<AirportLocation> {
// ...
}
}
----
======
`@RSocketExhange` supports a very similar method signature to `@MessageMapping`,
however, since it needs to be suitable both for requester and responder use,
there are slight differences. Notably, while `@MessageMapping` accepts
a `String` array as its `value` parameter, only a single `String` can be passed
as the `value` of `@RSocketExchange`.
When it comes to possible return values and the way we establish supported
RSocket interaction types, it works in the same way as with `@MessageMapping`.
Similarly to `@MessageMapping`, `@RSocketExchange` can also be used at class
level to specify a common prefix for all the method routes within the class.
[[rsocket-annot-connectmapping]]
=== @ConnectMapping
@ -1026,6 +1081,9 @@ Two, create a proxy that will perform the declared RSocket exchanges:
@@ -1026,6 +1081,9 @@ Two, create a proxy that will perform the declared RSocket exchanges:
RepositoryService service = factory.createClient(RadarService.class);
----
NOTE: Apart from RSocket interface services, `@RSocketExchange` can also
be used to create xref:rsocket.adoc#rsocket-annot-rsocketexchange[annotated responders].
@ -322,6 +325,15 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler {
@@ -322,6 +325,15 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler {
@ -402,7 +414,8 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler {
@@ -402,7 +414,8 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler {