From 9f6c0cb166792dd2f956db0eff088277d6bc08a0 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 28 Sep 2014 15:12:07 +0200 Subject: [PATCH] Polish Javadoc for @JmsListener --- .../jms/annotation/JmsListener.java | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListener.java b/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListener.java index 5649257b21f..4a9cf987b45 100644 --- a/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListener.java +++ b/spring-jms/src/main/java/org/springframework/jms/annotation/JmsListener.java @@ -26,9 +26,9 @@ import org.springframework.messaging.handler.annotation.MessageMapping; /** * Annotation that marks a method to be the target of a JMS message - * listener on the specified {@link #destination()}. The {@link #containerFactory()} + * listener on the specified {@link #destination}. The {@link #containerFactory} * identifies the {@link org.springframework.jms.config.JmsListenerContainerFactory - * JmsListenerContainerFactory} to use to build the jms listener container. If not + * JmsListenerContainerFactory} to use to build the JMS listener container. If not * set, a default container factory is assumed to be available with a bean * name of {@code jmsListenerContainerFactory} unless an explicit default has been * provided through configuration. @@ -36,34 +36,35 @@ import org.springframework.messaging.handler.annotation.MessageMapping; *

Processing of {@code @JmsListener} annotations is performed by * registering a {@link JmsListenerAnnotationBeanPostProcessor}. This can be * done manually or, more conveniently, through the {@code } - * element or {@link EnableJms} annotation. + * element or {@link EnableJms @EnableJms} annotation. * *

Annotated methods are allowed to have flexible signatures similar to what - * {@link MessageMapping} provides, that is + * {@link MessageMapping} provides: *

* - *

Annotated method may have a non {@code void} return type. When they do, the result of the - * method invocation is sent as a JMS reply to the destination defined by either the - * {@code JMSReplyTO} header of the incoming message. When this value is not set, a default - * destination can be provided by adding @{@link org.springframework.messaging.handler.annotation.SendTo - * SendTo} to the method declaration. + *

Annotated methods may have a non-{@code void} return type. When they do, + * the result of the method invocation is sent as a JMS reply to the destination + * defined by the {@code JMSReplyTO} header of the incoming message. If this header + * is not set, a default destination can be provided by adding + * {@link org.springframework.messaging.handler.annotation.SendTo @SendTo} to the + * method declaration. * * @author Stephane Nicoll * @since 4.1 @@ -78,21 +79,22 @@ public @interface JmsListener { /** * The unique identifier of the container managing this endpoint. - *

if none is specified an auto-generated one is provided. + *

If none is specified, an auto-generated one is provided. * @see org.springframework.jms.config.JmsListenerEndpointRegistry#getListenerContainer(String) */ String id() default ""; /** - * The bean name of the {@link org.springframework.jms.config.JmsListenerContainerFactory} - * to use to create the message listener container responsible to serve this endpoint. + * The bean name of the {@link org.springframework.jms.config.JmsListenerContainerFactory JmsListenerContainerFactory} + * to use to create the message listener container responsible for serving this endpoint. *

If not specified, the default container factory is used, if any. */ String containerFactory() default ""; /** * The destination name for this listener, resolved through the container-wide - * {@link org.springframework.jms.support.destination.DestinationResolver} strategy. + * {@link org.springframework.jms.support.destination.DestinationResolver DestinationResolver} + * strategy. */ String destination(); @@ -102,17 +104,19 @@ public @interface JmsListener { String subscription() default ""; /** - * The JMS message selector expression, if any + * The JMS message selector expression, if any. *

See the JMS specification for a detailed definition of selector expressions. */ String selector() default ""; /** - * The concurrency for the listener, if any. - *

The concurrency limits can be a "lower-upper" String, e.g. "5-10", or a simple - * upper limit String, e.g. "10" (the lower limit will be 1 in this case). - *

The underlying container may or may not support all features. For instance, it - * may not be able to scale: in that case only the upper value is used. + * The concurrency limits for the listener, if any. + *

The concurrency limits can be a "lower-upper" String — for example, + * "5-10" — or a simple upper limit String — for example, "10", in + * which case the lower limit will be 1. + *

Note that the underlying container may or may not support all features. + * For instance, it may not be able to scale, in which case only the upper limit + * is used. */ String concurrency() default "";