From 53d095aa2864d14453ffb412f99e2d2b21568a53 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 1 Jun 2015 13:56:44 +0200 Subject: [PATCH] Polish Javadoc for @SubscribeMapping --- .../simp/annotation/SubscribeMapping.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SubscribeMapping.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SubscribeMapping.java index b1143c85ac5..370dcc9e300 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SubscribeMapping.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SubscribeMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,22 +27,24 @@ import java.lang.annotation.Target; * on the destination of a subscription. Supported with STOMP over WebSocket only * (e.g. STOMP SUBSCRIBE frame). * - *

This is a method-level annotations that can be combined with a type-level - * {@link org.springframework.messaging.handler.annotation.MessageMapping @MessageMapping} + *

This is a method-level annotation that can be combined with a type-level + * {@link org.springframework.messaging.handler.annotation.MessageMapping @MessageMapping}. * - *

Supports the same method arguments as - * {@link org.springframework.messaging.handler.annotation.MessageMapping}, however + *

Supports the same method arguments as {@code @MessageMapping}; however, * subscription messages typically do not have a body. * - *

The return value also follows the same rules as for - * {@link org.springframework.messaging.handler.annotation.MessageMapping} except if - * the method is not annotated with - * {@link org.springframework.messaging.handler.annotation.SendTo} or {@link SendToUser}, - * the message is sent directly back to the connected user and does not pass through - * the message broker. This is useful for implementing a request-reply pattern. + *

The return value also follows the same rules as for {@code @MessageMapping}, + * except if the method is not annotated with + * {@link org.springframework.messaging.handler.annotation.SendTo SendTo} or + * {@link SendToUser}, the message is sent directly back to the connected + * user and does not pass through the message broker. This is useful for + * implementing a request-reply pattern. * * @author Rossen Stoyanchev * @since 4.0 + * @see org.springframework.messaging.handler.annotation.MessageMapping + * @see org.springframework.messaging.handler.annotation.SendTo + * @see org.springframework.messaging.simp.annotation.SendToUser */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @@ -51,9 +53,9 @@ public @interface SubscribeMapping { /** * Destination-based mapping expressed by this annotation. - *

For STOMP over WebSocket messages: this is the destination of the STOMP message - * (e.g. "/positions"). Ant-style path patterns (e.g. "/price.stock.*") are supported - * and so are path template variables (e.g. "/price.stock.{ticker}""). + *

This is the destination of the STOMP message (e.g. {@code "/positions"}). + * Ant-style path patterns (e.g. {@code "/price.stock.*"}) and path template + * variables (e.g. "/price.stock.{ticker}") are also supported. */ String[] value() default {};