Skip to content

Commit cbdb99c

Browse files
committed
Add basic javadoc to spring-messaging annotations
1 parent 5017855 commit cbdb99c

File tree

7 files changed

+38
-1
lines changed

7 files changed

+38
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25+
import org.springframework.messaging.Message;
26+
2527

2628
/**
27-
* Annotation indicating a method parameter should be bound to the body of a message.
29+
* Annotation indicating a method parameter should be bound to the body of a
30+
* {@link Message}.
2831
*
2932
* @author Rossen Stoyanchev
3033
* @since 4.0

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525

2626

2727
/**
28+
* Annotation for handling exceptions from message-handling methods within specific
29+
* handler methods.
30+
*
31+
*
2832
* @author Rossen Stoyanchev
2933
* @since 4.0
3034
*/

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25+
import org.springframework.messaging.Message;
26+
27+
2528
/**
29+
* Annotation for mapping a {@link Message} onto specific handler handler methods based on
30+
* the destination for the message.
31+
*
2632
* @author Rossen Stoyanchev
2733
* @since 4.0
2834
*/

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25+
import org.springframework.messaging.Message;
26+
2527

2628
/**
29+
* Annotation that indicates a method's return value should be converted to
30+
* a {@link Message} and sent to the specified destination.
31+
*
2732
* @author Rossen Stoyanchev
2833
* @since 4.0
2934
*/

spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/ReplyToUser.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,23 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25+
import org.springframework.messaging.Message;
26+
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
27+
2528

2629
/**
30+
* Annotation that can be used on methods processing an input message to indicate that the
31+
* method's return value should be converted to a {@link Message} and sent to the
32+
* specified destination with the prefix <code>"/user/{username}"</code> automatically
33+
* prepended with the user information expected to be the input message header
34+
* {@link SimpMessageHeaderAccessor#USER_HEADER}. Such user destinations may need to be
35+
* further resolved to actual destinations.
36+
*
2737
* @author Rossen Stoyanchev
2838
* @since 4.0
39+
*
40+
* @see org.springframework.messaging.handler.annotation.ReplyTo
41+
* @see org.springframework.messaging.simp.handler.UserDestinationMessageHandler
2942
*/
3043
@Target(ElementType.METHOD)
3144
@Retention(RetentionPolicy.RUNTIME)

spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SubscribeEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525

2626
/**
27+
* Annotation for mapping subscription events onto specific handler handler methods based
28+
* on the destination for the message (e.g. STOMP SUBSCRIBE message).
29+
*
2730
* @author Rossen Stoyanchev
2831
* @since 4.0
2932
*/

spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/UnsubscribeEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525

2626
/**
27+
* Annotation for mapping unsubscribe events onto specific handler handler methods based
28+
* on the destination for the message (e.g. STOMP UNSUBSCRIBE message).
29+
*
2730
* @author Rossen Stoyanchev
2831
* @since 4.0
2932
*/

0 commit comments

Comments
 (0)