注释类型 ConnectMapping
@Target(METHOD) @Retention(RUNTIME) @Documented public @interface ConnectMapping
Annotation to map the initialConnectionSetupPayloadand subsequent metadata pushes onto a handler method.This is a method-level annotation that can be combined with a type-level
@MessageMappingfor a combined route pattern. It supports the same arguments as@MessageMappingbut the return value must bevoid. On a server, handling can be asynchronous (e.g.Mono<Void>), in which case the connection is accepted if and when theMono<Void>completes. On the client side this method is only a callback and does not affect the establishment of the connection.Note: an
@ConnectMappingmethod may start requests to the remote through anRSocketRequestermethod argument, but it must do so independent of the handling thread (e.g. via subscribing on a different thread).- 从以下版本开始:
- 5.2
- 作者:
- Rossen Stoyanchev
元素详细资料
value
String[] value
Mappings expressed by this annotation to match to the route from the metadata of the initialConnectionSetupPayloador in subsequent metadata pushes.Depending on the configured
RouteMatcher, the pattern may beAntPathMatcherorPathPatternbased.By default this is an empty array in which case it matches all
ConnectionSetupPayloadand metadata pushes.- 默认值:
- {}