Skip to content

Commit 9f6c0cb

Browse files
committed
Polish Javadoc for @JmsListener
1 parent 3908804 commit 9f6c0cb

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

spring-jms/src/main/java/org/springframework/jms/annotation/JmsListener.java

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,45 @@
2626

2727
/**
2828
* Annotation that marks a method to be the target of a JMS message
29-
* listener on the specified {@link #destination()}. The {@link #containerFactory()}
29+
* listener on the specified {@link #destination}. The {@link #containerFactory}
3030
* identifies the {@link org.springframework.jms.config.JmsListenerContainerFactory
31-
* JmsListenerContainerFactory} to use to build the jms listener container. If not
31+
* JmsListenerContainerFactory} to use to build the JMS listener container. If not
3232
* set, a <em>default</em> container factory is assumed to be available with a bean
3333
* name of {@code jmsListenerContainerFactory} unless an explicit default has been
3434
* provided through configuration.
3535
*
3636
* <p>Processing of {@code @JmsListener} annotations is performed by
3737
* registering a {@link JmsListenerAnnotationBeanPostProcessor}. This can be
3838
* done manually or, more conveniently, through the {@code <jms:annotation-driven/>}
39-
* element or {@link EnableJms} annotation.
39+
* element or {@link EnableJms @EnableJms} annotation.
4040
*
4141
* <p>Annotated methods are allowed to have flexible signatures similar to what
42-
* {@link MessageMapping} provides, that is
42+
* {@link MessageMapping} provides:
4343
* <ul>
4444
* <li>{@link javax.jms.Session} to get access to the JMS session</li>
45-
* <li>{@link javax.jms.Message} or one if subclass to get access to the raw JMS message</li>
46-
* <li>{@link org.springframework.messaging.Message} to use the messaging abstraction counterpart</li>
45+
* <li>{@link javax.jms.Message} or one of its subclasses to get access to the raw JMS message</li>
46+
* <li>{@link org.springframework.messaging.Message} to use Spring's messaging abstraction counterpart</li>
4747
* <li>{@link org.springframework.messaging.handler.annotation.Payload @Payload}-annotated method
48-
* arguments including the support of validation</li>
48+
* arguments, including support for validation</li>
4949
* <li>{@link org.springframework.messaging.handler.annotation.Header @Header}-annotated method
50-
* arguments to extract a specific header value, including standard JMS headers defined by
50+
* arguments to extract specific header values, including standard JMS headers defined by
5151
* {@link org.springframework.jms.support.JmsHeaders JmsHeaders}</li>
5252
* <li>{@link org.springframework.messaging.handler.annotation.Headers @Headers}-annotated
53-
* argument that must also be assignable to {@link java.util.Map} for getting access to all
54-
* headers.</li>
53+
* method argument that must also be assignable to {@link java.util.Map} for obtaining access to all
54+
* headers</li>
5555
* <li>{@link org.springframework.messaging.MessageHeaders MessageHeaders} arguments for
56-
* getting access to all headers.</li>
56+
* obtaining access to all headers</li>
5757
* <li>{@link org.springframework.messaging.support.MessageHeaderAccessor MessageHeaderAccessor}
5858
* or {@link org.springframework.jms.support.JmsMessageHeaderAccessor JmsMessageHeaderAccessor}
59-
* for convenient access to all method arguments.</li>
59+
* for convenient access to all method arguments</li>
6060
* </ul>
6161
*
62-
* <p>Annotated method may have a non {@code void} return type. When they do, the result of the
63-
* method invocation is sent as a JMS reply to the destination defined by either the
64-
* {@code JMSReplyTO} header of the incoming message. When this value is not set, a default
65-
* destination can be provided by adding @{@link org.springframework.messaging.handler.annotation.SendTo
66-
* SendTo} to the method declaration.
62+
* <p>Annotated methods may have a non-{@code void} return type. When they do,
63+
* the result of the method invocation is sent as a JMS reply to the destination
64+
* defined by the {@code JMSReplyTO} header of the incoming message. If this header
65+
* is not set, a default destination can be provided by adding
66+
* {@link org.springframework.messaging.handler.annotation.SendTo @SendTo} to the
67+
* method declaration.
6768
*
6869
* @author Stephane Nicoll
6970
* @since 4.1
@@ -78,21 +79,22 @@
7879

7980
/**
8081
* The unique identifier of the container managing this endpoint.
81-
* <p>if none is specified an auto-generated one is provided.
82+
* <p>If none is specified, an auto-generated one is provided.
8283
* @see org.springframework.jms.config.JmsListenerEndpointRegistry#getListenerContainer(String)
8384
*/
8485
String id() default "";
8586

8687
/**
87-
* The bean name of the {@link org.springframework.jms.config.JmsListenerContainerFactory}
88-
* to use to create the message listener container responsible to serve this endpoint.
88+
* The bean name of the {@link org.springframework.jms.config.JmsListenerContainerFactory JmsListenerContainerFactory}
89+
* to use to create the message listener container responsible for serving this endpoint.
8990
* <p>If not specified, the default container factory is used, if any.
9091
*/
9192
String containerFactory() default "";
9293

9394
/**
9495
* The destination name for this listener, resolved through the container-wide
95-
* {@link org.springframework.jms.support.destination.DestinationResolver} strategy.
96+
* {@link org.springframework.jms.support.destination.DestinationResolver DestinationResolver}
97+
* strategy.
9698
*/
9799
String destination();
98100

@@ -102,17 +104,19 @@
102104
String subscription() default "";
103105

104106
/**
105-
* The JMS message selector expression, if any
107+
* The JMS message selector expression, if any.
106108
* <p>See the JMS specification for a detailed definition of selector expressions.
107109
*/
108110
String selector() default "";
109111

110112
/**
111-
* The concurrency for the listener, if any.
112-
* <p>The concurrency limits can be a "lower-upper" String, e.g. "5-10", or a simple
113-
* upper limit String, e.g. "10" (the lower limit will be 1 in this case).
114-
* <p>The underlying container may or may not support all features. For instance, it
115-
* may not be able to scale: in that case only the upper value is used.
113+
* The concurrency limits for the listener, if any.
114+
* <p>The concurrency limits can be a "lower-upper" String &mdash; for example,
115+
* "5-10" &mdash; or a simple upper limit String &mdash; for example, "10", in
116+
* which case the lower limit will be 1.
117+
* <p>Note that the underlying container may or may not support all features.
118+
* For instance, it may not be able to scale, in which case only the upper limit
119+
* is used.
116120
*/
117121
String concurrency() default "";
118122

0 commit comments

Comments
 (0)