diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java index 2f68d557f90..6ab99f168d3 100644 --- a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java +++ b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java @@ -51,7 +51,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable { /** * Concurrency limit which signals unbounded concurrency: {@value}. - *
Setting the limit to this value permits any number of concurrent access: + *
Setting the limit to this value permits unbounded concurrent access: * that is, concurrency will not be throttled. * @see #NO_CONCURRENCY */ @@ -81,12 +81,13 @@ public abstract class ConcurrencyThrottleSupport implements Serializable { /** * Set the maximum number of concurrent access attempts allowed. - * The default of -1 indicates no concurrency limit at all. + * The default of {@value #UNBOUNDED_CONCURRENCY} indicates no concurrency + * limit at all. *
In principle, this limit can be changed at runtime, * although it is generally designed as a config time setting. - *
NOTE: Do not switch between -1 and any concrete limit at runtime, - * as this will lead to inconsistent concurrency counts: A limit - * of -1 effectively turns off concurrency counting completely. + *
NOTE: Do not switch between {@code -1} and any concrete limit at runtime, + * as this will lead to inconsistent concurrency counts. A limit + * of {@code -1} effectively turns off concurrency counting completely. */ public void setConcurrencyLimit(int concurrencyLimit) { this.concurrencyLimit = concurrencyLimit; diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java index 352d214ec81..3561bab0183 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java @@ -26,15 +26,15 @@ import org.springframework.jms.JmsException; /** * Specifies a basic set of JMS operations. * - *
Implemented by {@link JmsTemplate}. Not often used but a useful option - * to enhance testability, as it can easily be mocked or stubbed. + *
Implemented by {@link JmsTemplate}. Not often used directly, but a useful + * option to enhance testability, as it can easily be mocked or stubbed. * *
Provides {@code JmsTemplate's} {@code send(..)} and * {@code receive(..)} methods that mirror various JMS API methods. * See the JMS specification and javadocs for details on those methods. * - *
Provides also basic request reply operation using a temporary - * queue to collect the reply. + *
Provides also basic request-reply operations using a temporary queue to
+ * receive the reply.
*
* @author Mark Pollack
* @author Juergen Hoeller
@@ -58,7 +58,7 @@ public interface JmsOperations {
/**
* Send messages to the default JMS destination (or one specified
- * for each send operation). The callback gives access to the JMS Session
+ * for each send operation). The callback provides access to the JMS Session
* and MessageProducer in order to perform complex send operations.
* @param action callback object that exposes the session/producer pair
* @return the result object from working with the session
@@ -67,7 +67,7 @@ public interface JmsOperations {
The {@link MessageCreator} callback creates the message given a Session,
+ * and the specified {@code responseQueue} is set in the {@code JMSReplyTO}
+ * header of the message.
+ * @param destination the destination to send the message to
* @param responseQueue the destination to receive the reply from
* @param messageCreator callback to create a message
* @return the reply, possibly {@code null} if the message could not be received,
@@ -413,13 +415,16 @@ public interface JmsOperations {
* @throws JmsException checked JMSException converted to unchecked
* @since 7.0.4
*/
- @Nullable Message sendAndReceive(Destination destination, Destination responseQueue, MessageCreator messageCreator) throws JmsException;
+ @Nullable Message sendAndReceive(Destination destination, Destination responseQueue, MessageCreator messageCreator)
+ throws JmsException;
/**
- * Send a message and receive the reply from the specified destination. The
- * {@link MessageCreator} callback creates the message given a Session. A given
- * responseQueue is set in the {@code JMSReplyTO} header of the message.
- * @param destinationName the name of the destination to send this message to
+ * Send a message to the specified destination and receive the reply from the
+ * specified response queue.
+ * The {@link MessageCreator} callback creates the message given a Session,
+ * and the destination with the specified {@code responseQueueName} is set in
+ * the {@code JMSReplyTO} header of the message.
+ * @param destinationName the name of the destination to send the message to
* (to be resolved to an actual destination by a DestinationResolver)
* @param responseQueueName the name of the destination to receive the reply from
* (to be resolved to an actual destination by a DestinationResolver)
@@ -429,7 +434,8 @@ public interface JmsOperations {
* @throws JmsException checked JMSException converted to unchecked
* @since 7.0.4
*/
- @Nullable Message sendAndReceive(String destinationName, String responseQueueName, MessageCreator messageCreator) throws JmsException;
+ @Nullable Message sendAndReceive(String destinationName, String responseQueueName, MessageCreator messageCreator)
+ throws JmsException;
//---------------------------------------------------------------------------------------
@@ -437,7 +443,7 @@ public interface JmsOperations {
//---------------------------------------------------------------------------------------
/**
- * Browse messages in the default JMS queue. The callback gives access to the JMS
+ * Browse messages in the default JMS queue. The callback provides access to the JMS
* Session and QueueBrowser in order to browse the queue and react to the contents.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session
@@ -446,7 +452,7 @@ public interface JmsOperations {
Return the response message or {@code null} if no message has
+ * Return the response message or {@code null} if no message has been received.
* @throws JMSException if thrown by JMS API methods
*/
protected @Nullable Message doSendAndReceive(Session session, Destination destination, MessageCreator messageCreator)
@@ -943,8 +943,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
/**
* Send a request message to the given {@link Destination destination} and block until
- * a reply has been received on a {@link Destination responseQueue} queue.
- * Return the response message or {@code null} if no message has
+ * a reply has been received on the specified {@link Destination responseQueue}.
+ * Return the response message or {@code null} if no message has been received.
* @throws JMSException if thrown by JMS API methods
*/
protected @Nullable Message doSendAndReceive(Session session, Destination destination, Destination responseQueue, MessageCreator messageCreator)