Polish Javadoc

This commit is contained in:
Sam Brannen
2026-01-18 16:52:04 +01:00
parent 7aa862f5ec
commit 4d4adeb2c6
3 changed files with 42 additions and 33 deletions
@@ -51,7 +51,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable {
/**
* Concurrency limit which signals unbounded concurrency: {@value}.
* <p>Setting the limit to this value permits any number of concurrent access:
* <p>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.
* <p>In principle, this limit can be changed at runtime,
* although it is generally designed as a config time setting.
* <p>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.
* <p>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;
@@ -26,15 +26,15 @@ import org.springframework.jms.JmsException;
/**
* Specifies a basic set of JMS operations.
*
* <p>Implemented by {@link JmsTemplate}. Not often used but a useful option
* to enhance testability, as it can easily be mocked or stubbed.
* <p>Implemented by {@link JmsTemplate}. Not often used directly, but a useful
* option to enhance testability, as it can easily be mocked or stubbed.
*
* <p>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.
*
* <p>Provides also basic request reply operation using a temporary
* queue to collect the reply.
* <p>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 {
<T> @Nullable T execute(ProducerCallback<T> action) throws JmsException;
/**
* Send messages to a JMS destination. The callback gives access to the JMS Session
* Send messages to a JMS destination. The callback provides access to the JMS Session
* and MessageProducer in order to perform complex send operations.
* @param destination the destination to send messages to
* @param action callback object that exposes the session/producer pair
@@ -77,7 +77,7 @@ public interface JmsOperations {
<T> @Nullable T execute(Destination destination, ProducerCallback<T> action) throws JmsException;
/**
* Send messages to a JMS destination. The callback gives access to the JMS Session
* Send messages to a JMS destination. The callback provides access to the JMS Session
* and MessageProducer in order to perform complex send operations.
* @param destinationName the name of the destination to send messages to
* (to be resolved to an actual destination by a DestinationResolver)
@@ -402,10 +402,12 @@ public interface JmsOperations {
@Nullable Message sendAndReceive(String destinationName, 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 destination the destination to send this message to
* Send a message to the specified destination and receive the reply from the
* specified response queue.
* <p>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.
* <p>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 {
<T> @Nullable T browse(BrowserCallback<T> action) throws JmsException;
/**
* Browse messages in a JMS queue. The callback gives access to the JMS Session
* Browse messages in a JMS queue. The callback provides access to the JMS Session
* and QueueBrowser in order to browse the queue and react to the contents.
* @param queue the queue to browse
* @param action callback object that exposes the session/browser pair
@@ -456,7 +462,7 @@ public interface JmsOperations {
<T> @Nullable T browse(Queue queue, BrowserCallback<T> action) throws JmsException;
/**
* Browse messages in a JMS queue. The callback gives access to the JMS Session
* Browse messages in a JMS queue. The callback provides access to the JMS Session
* and QueueBrowser in order to browse the queue and react to the contents.
* @param queueName the name of the queue to browse
* (to be resolved to an actual destination by a DestinationResolver)
@@ -467,7 +473,7 @@ public interface JmsOperations {
<T> @Nullable T browse(String queueName, BrowserCallback<T> action) throws JmsException;
/**
* Browse selected messages in a JMS queue. The callback gives access to the JMS
* Browse selected messages in a JMS queue. The callback provides access to the JMS
* Session and QueueBrowser in order to browse the queue and react to the contents.
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
@@ -478,7 +484,7 @@ public interface JmsOperations {
<T> @Nullable T browseSelected(@Nullable String messageSelector, BrowserCallback<T> action) throws JmsException;
/**
* Browse selected messages in a JMS queue. The callback gives access to the JMS
* Browse selected messages in a JMS queue. The callback provides access to the JMS
* Session and QueueBrowser in order to browse the queue and react to the contents.
* @param queue the queue to browse
* @param messageSelector the JMS message selector expression (or {@code null} if none).
@@ -487,10 +493,11 @@ public interface JmsOperations {
* @return the result object from working with the session
* @throws JmsException checked JMSException converted to unchecked
*/
<T> @Nullable T browseSelected(Queue queue, @Nullable String messageSelector, BrowserCallback<T> action) throws JmsException;
<T> @Nullable T browseSelected(Queue queue, @Nullable String messageSelector, BrowserCallback<T> action)
throws JmsException;
/**
* Browse selected messages in a JMS queue. The callback gives access to the JMS
* Browse selected messages in a JMS queue. The callback provides access to the JMS
* Session and QueueBrowser in order to browse the queue and react to the contents.
* @param queueName the name of the queue to browse
* (to be resolved to an actual destination by a DestinationResolver)
@@ -500,6 +507,7 @@ public interface JmsOperations {
* @return the result object from working with the session
* @throws JmsException checked JMSException converted to unchecked
*/
<T> @Nullable T browseSelected(String queueName, @Nullable String messageSelector, BrowserCallback<T> action) throws JmsException;
<T> @Nullable T browseSelected(String queueName, @Nullable String messageSelector, BrowserCallback<T> action)
throws JmsException;
}
@@ -923,7 +923,7 @@ 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 temporary queue created on-the-fly.
* <p>Return the response message or {@code null} if no message has
* <p>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.
* <p>Return the response message or {@code null} if no message has
* a reply has been received on the specified {@link Destination responseQueue}.
* <p>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)