Polish Javadoc for @MessageMapping

This commit is contained in:
Sam Brannen 2015-06-01 13:37:08 +02:00
parent 4ecb8611bc
commit a6f53ef2a7
1 changed files with 15 additions and 13 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2014 the original author or authors. * Copyright 2002-2015 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -65,16 +65,17 @@ import org.springframework.messaging.Message;
* authentication (e.g. Spring Security based) can be used to secure the * authentication (e.g. Spring Security based) can be used to secure the
* HTTP handshake that initiates WebSocket sessions.</li> * HTTP handshake that initiates WebSocket sessions.</li>
* </ul> * </ul>
* <p>By default the return value is wrapped as a message and sent to the destination
* specified with an {@link SendTo} method-level annotation.
* *
* <p>STOMP over WebSocket: an {@link SendTo} annotation is not strictly required -- * <p>By default the return value is wrapped as a message and sent to the destination
* by default the message will be sent to the same destination as the incoming * specified with an {@link SendTo @SendTo} method-level annotation.
* message but with an additional prefix ("/topic" by default). It is also possible *
* to use {@link org.springframework.messaging.simp.annotation.SendToUser} to * <h3>STOMP over WebSocket</h3>
* have the message directed to a specific user only if connected. * <p>An {@link SendTo @SendTo} annotation is not strictly required &mdash; by default
* Also the return value is converted with a * the message will be sent to the same destination as the incoming message but with
* {@link org.springframework.messaging.converter.MessageConverter}. * an additional prefix ({@code "/topic"} by default). It is also possible to use the
* {@link org.springframework.messaging.simp.annotation.SendToUser} annotation to
* have the message directed to a specific user if connected. The return value is
* converted with a {@link org.springframework.messaging.converter.MessageConverter}.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 4.0 * @since 4.0
@ -87,9 +88,10 @@ public @interface MessageMapping {
/** /**
* Destination-based mapping expressed by this annotation. * Destination-based mapping expressed by this annotation.
* <p>For STOMP over WebSocket messages: this is the destination of the STOMP message * <p>For STOMP over WebSocket messages: this is the destination of the
* (e.g. "/positions"). Ant-style path patterns (e.g. "/price.stock.*") are supported * STOMP message (e.g. {@code "/positions"}). Ant-style path patterns
* and so are path template variables (e.g. "/price.stock.{ticker}""). * (e.g. {@code "/price.stock.*"}) and path template variables (e.g.
* <code>"/price.stock.{ticker}"</code>) are also supported.
*/ */
String[] value() default {}; String[] value() default {};