Skip to content

Commit a6f53ef

Browse files
committed
Polish Javadoc for @MessageMapping
1 parent 4ecb861 commit a6f53ef

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

  • spring-messaging/src/main/java/org/springframework/messaging/handler/annotation

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessageMapping.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,16 +65,17 @@
6565
* authentication (e.g. Spring Security based) can be used to secure the
6666
* HTTP handshake that initiates WebSocket sessions.</li>
6767
* </ul>
68+
*
6869
* <p>By default the return value is wrapped as a message and sent to the destination
69-
* specified with an {@link SendTo} method-level annotation.
70+
* specified with an {@link SendTo @SendTo} method-level annotation.
7071
*
71-
* <p>STOMP over WebSocket: an {@link SendTo} annotation is not strictly required --
72-
* by default the message will be sent to the same destination as the incoming
73-
* message but with an additional prefix ("/topic" by default). It is also possible
74-
* to use {@link org.springframework.messaging.simp.annotation.SendToUser} to
75-
* have the message directed to a specific user only if connected.
76-
* Also the return value is converted with a
77-
* {@link org.springframework.messaging.converter.MessageConverter}.
72+
* <h3>STOMP over WebSocket</h3>
73+
* <p>An {@link SendTo @SendTo} annotation is not strictly required &mdash; by default
74+
* the message will be sent to the same destination as the incoming message but with
75+
* an additional prefix ({@code "/topic"} by default). It is also possible to use the
76+
* {@link org.springframework.messaging.simp.annotation.SendToUser} annotation to
77+
* have the message directed to a specific user if connected. The return value is
78+
* converted with a {@link org.springframework.messaging.converter.MessageConverter}.
7879
*
7980
* @author Rossen Stoyanchev
8081
* @since 4.0
@@ -87,9 +88,10 @@
8788

8889
/**
8990
* Destination-based mapping expressed by this annotation.
90-
* <p>For STOMP over WebSocket messages: this is the destination of the STOMP message
91-
* (e.g. "/positions"). Ant-style path patterns (e.g. "/price.stock.*") are supported
92-
* and so are path template variables (e.g. "/price.stock.{ticker}"").
91+
* <p>For STOMP over WebSocket messages: this is the destination of the
92+
* STOMP message (e.g. {@code "/positions"}). Ant-style path patterns
93+
* (e.g. {@code "/price.stock.*"}) and path template variables (e.g.
94+
* <code>"/price.stock.{ticker}"</code>) are also supported.
9395
*/
9496
String[] value() default {};
9597

0 commit comments

Comments
 (0)