Top Description Methods
org.springframework.messaging.rsocket.annotation

public @Interface ConnectMapping

extends Annotation
Annotations
@Target:METHOD
@Retention:RUNTIME
@Documented
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, io.rsocket.ConnectionSetupPayload

Annotation to map the initial ConnectionSetupPayload and subsequent metadata pushes onto a handler method.

This is a method-level annotation that can be combined with a type-level @MessageMapping for a combined route pattern. It supports the same arguments as @MessageMapping but the return value must be void. On a server, handling can be asynchronous (e.g. Mono<Void>), in which case the connection is accepted if and when the Mono<Void> completes. On the client side this method is only a callback and does not affect the establishment of the connection.

Note

an @ConnectMapping method may start requests to the remote through an RSocketRequester method argument, but it must do so independent of the handling thread (e.g. via subscribing on a different thread).

Author
Rossen Stoyanchev
Since
5.2

Method Summary

Modifier and TypeMethod and Description
public String[]
value()

Mappings expressed by this annotation to match to the route from the metadata of the initial ConnectionSetupPayload or in subsequent metadata pushes.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String[] value()

Mappings expressed by this annotation to match to the route from the metadata of the initial ConnectionSetupPayload or in subsequent metadata pushes.

Depending on the configured RouteMatcher, the pattern may be AntPathMatcher or PathPattern based.

By default this is an empty array in which case it matches all ConnectionSetupPayload and metadata pushes.