Replace <code> with {@code} throughout Javadoc

Issue: SPR-10128
This commit is contained in:
Chris Beams
2012-12-18 14:45:36 +01:00
parent 8597ec25ec
commit 9540d2c81b
1503 changed files with 8001 additions and 8060 deletions

View File

@@ -51,7 +51,7 @@ public abstract class JmsException extends NestedRuntimeException {
/**
* Constructor that takes a plain root cause, intended for
* subclasses mirroring corresponding <code>javax.jms</code> exceptions.
* subclasses mirroring corresponding {@code javax.jms} exceptions.
* @param cause the cause of the exception. This argument is generally
* expected to be a proper subclass of {@link javax.jms.JMSException}.
*/
@@ -64,7 +64,7 @@ public abstract class JmsException extends NestedRuntimeException {
* Convenience method to get the vendor specific error code if
* the root cause was an instance of JMSException.
* @return a string specifying the vendor-specific error code if the
* root cause is an instance of JMSException, or <code>null</code>
* root cause is an instance of JMSException, or {@code null}
*/
public String getErrorCode() {
Throwable cause = getCause();

View File

@@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
/**
* Parser for the JMS <code>&lt;jca-listener-container&gt;</code> element.
* Parser for the JMS {@code &lt;jca-listener-container&gt;} element.
*
* @author Juergen Hoeller
* @since 2.5

View File

@@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
/**
* Parser for the JMS <code>&lt;listener-container&gt;</code> element.
* Parser for the JMS {@code &lt;listener-container&gt;} element.
*
* @author Mark Fisher
* @author Juergen Hoeller

View File

@@ -59,8 +59,8 @@ import org.springframework.util.ObjectUtils;
*
* <p>When using the JMS 1.0.2 API, this ConnectionFactory will switch
* into queue/topic mode according to the JMS API methods used at runtime:
* <code>createQueueConnection</code> and <code>createTopicConnection</code> will
* lead to queue/topic mode, respectively; generic <code>createConnection</code>
* {@code createQueueConnection} and {@code createTopicConnection} will
* lead to queue/topic mode, respectively; generic {@code createConnection}
* calls will lead to a JMS 1.1 connection which is able to serve both modes.
*
* <p><b>NOTE: This ConnectionFactory requires explicit closing of all Sessions
@@ -71,7 +71,7 @@ import org.springframework.util.ObjectUtils;
* <p>Note also that MessageConsumers obtained from a cached Session won't get
* closed until the Session will eventually be removed from the pool. This may
* lead to semantic side effects in some cases. For a durable subscriber, the
* logical <code>Session.close()</code> call will also close the subscription.
* logical {@code Session.close()} call will also close the subscription.
* Re-registering a durable consumer for the same subscription on the same
* Session handle is not supported; close and reobtain a cached Session first.
*

View File

@@ -57,9 +57,9 @@ public abstract class ConnectionFactoryUtils {
* This is essentially a more sophisticated version of
* {@link org.springframework.jms.support.JmsUtils#closeConnection}.
* @param con the Connection to release
* (if this is <code>null</code>, the call will be ignored)
* (if this is {@code null}, the call will be ignored)
* @param cf the ConnectionFactory that the Connection was obtained from
* (may be <code>null</code>)
* (may be {@code null})
* @param started whether the Connection might have been started by the application
* @see SmartConnectionFactory#shouldStop
* @see org.springframework.jms.support.JmsUtils#closeConnection
@@ -122,13 +122,13 @@ public abstract class ConnectionFactoryUtils {
* Obtain a JMS Session that is synchronized with the current transaction, if any.
* @param cf the ConnectionFactory to obtain a Session for
* @param existingCon the existing JMS Connection to obtain a Session for
* (may be <code>null</code>)
* (may be {@code null})
* @param synchedLocalTransactionAllowed whether to allow for a local JMS transaction
* that is synchronized with a Spring-managed transaction (where the main transaction
* might be a JDBC-based one for a specific DataSource, for example), with the JMS
* transaction committing right after the main transaction. If not allowed, the given
* ConnectionFactory needs to handle transaction enlistment underneath the covers.
* @return the transactional Session, or <code>null</code> if none found
* @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static Session getTransactionalSession(
@@ -159,13 +159,13 @@ public abstract class ConnectionFactoryUtils {
* <p>Mainly intended for use with the JMS 1.0.2 API.
* @param cf the ConnectionFactory to obtain a Session for
* @param existingCon the existing JMS Connection to obtain a Session for
* (may be <code>null</code>)
* (may be {@code null})
* @param synchedLocalTransactionAllowed whether to allow for a local JMS transaction
* that is synchronized with a Spring-managed transaction (where the main transaction
* might be a JDBC-based one for a specific DataSource, for example), with the JMS
* transaction committing right after the main transaction. If not allowed, the given
* ConnectionFactory needs to handle transaction enlistment underneath the covers.
* @return the transactional Session, or <code>null</code> if none found
* @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static QueueSession getTransactionalQueueSession(
@@ -196,13 +196,13 @@ public abstract class ConnectionFactoryUtils {
* <p>Mainly intended for use with the JMS 1.0.2 API.
* @param cf the ConnectionFactory to obtain a Session for
* @param existingCon the existing JMS Connection to obtain a Session for
* (may be <code>null</code>)
* (may be {@code null})
* @param synchedLocalTransactionAllowed whether to allow for a local JMS transaction
* that is synchronized with a Spring-managed transaction (where the main transaction
* might be a JDBC-based one for a specific DataSource, for example), with the JMS
* transaction committing right after the main transaction. If not allowed, the given
* ConnectionFactory needs to handle transaction enlistment underneath the covers.
* @return the transactional Session, or <code>null</code> if none found
* @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static TopicSession getTransactionalTopicSession(
@@ -230,13 +230,13 @@ public abstract class ConnectionFactoryUtils {
/**
* Obtain a JMS Session that is synchronized with the current transaction, if any.
* <p>This <code>doGetTransactionalSession</code> variant always starts the underlying
* <p>This {@code doGetTransactionalSession} variant always starts the underlying
* JMS Connection, assuming that the Session will be used for receiving messages.
* @param connectionFactory the JMS ConnectionFactory to bind for
* (used as TransactionSynchronizationManager key)
* @param resourceFactory the ResourceFactory to use for extracting or creating
* JMS resources
* @return the transactional Session, or <code>null</code> if none found
* @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
* @see #doGetTransactionalSession(javax.jms.ConnectionFactory, ResourceFactory, boolean)
*/
@@ -254,8 +254,8 @@ public abstract class ConnectionFactoryUtils {
* JMS resources
* @param startConnection whether the underlying JMS Connection approach should be
* started in order to allow for receiving messages. Note that a reused Connection
* may already have been started before, even if this flag is <code>false</code>.
* @return the transactional Session, or <code>null</code> if none found
* may already have been started before, even if this flag is {@code false}.
* @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static Session doGetTransactionalSession(
@@ -335,7 +335,7 @@ public abstract class ConnectionFactoryUtils {
/**
* Callback interface for resource creation.
* Serving as argument for the <code>doGetTransactionalSession</code> method.
* Serving as argument for the {@code doGetTransactionalSession} method.
*/
public interface ResourceFactory {
@@ -343,7 +343,7 @@ public abstract class ConnectionFactoryUtils {
* Fetch an appropriate Session from the given JmsResourceHolder.
* @param holder the JmsResourceHolder
* @return an appropriate Session fetched from the holder,
* or <code>null</code> if none found
* or {@code null} if none found
*/
Session getSession(JmsResourceHolder holder);
@@ -351,7 +351,7 @@ public abstract class ConnectionFactoryUtils {
* Fetch an appropriate Connection from the given JmsResourceHolder.
* @param holder the JmsResourceHolder
* @return an appropriate Connection fetched from the holder,
* or <code>null</code> if none found
* or {@code null} if none found
*/
Connection getConnection(JmsResourceHolder holder);

View File

@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
/**
* {@link javax.jms.ConnectionFactory} implementation that delegates all calls
* to a given target {@link javax.jms.ConnectionFactory}, adapting specific
* <code>create(Queue/Topic)Connection</code> calls to the target ConnectionFactory
* {@code create(Queue/Topic)Connection} calls to the target ConnectionFactory
* if necessary (e.g. when running JMS 1.0.2 API based code against a generic
* JMS 1.1 ConnectionFactory, such as ActiveMQ's PooledConnectionFactory).
*

View File

@@ -72,7 +72,7 @@ public class JmsResourceHolder extends ResourceHolderSupport {
/**
* Create a new JmsResourceHolder that is open for resources to be added.
* @param connectionFactory the JMS ConnectionFactory that this
* resource holder is associated with (may be <code>null</code>)
* resource holder is associated with (may be {@code null})
*/
public JmsResourceHolder(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
@@ -101,7 +101,7 @@ public class JmsResourceHolder extends ResourceHolderSupport {
/**
* Create a new JmsResourceHolder for the given JMS resources.
* @param connectionFactory the JMS ConnectionFactory that this
* resource holder is associated with (may be <code>null</code>)
* resource holder is associated with (may be {@code null})
* @param connection the JMS Connection
* @param session the JMS Session
*/

View File

@@ -69,8 +69,8 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
*
* <p>The use of a <i>raw</i> target ConnectionFactory would not only be inefficient
* because of the lack of resource reuse. It might also lead to strange effects
* when your JMS driver doesn't accept <code>MessageProducer.close()</code> calls
* and/or <code>MessageConsumer.close()</code> calls before <code>Session.commit()</code>,
* when your JMS driver doesn't accept {@code MessageProducer.close()} calls
* and/or {@code MessageConsumer.close()} calls before {@code Session.commit()},
* with the latter supposed to commit all the messages that have been sent through the
* producer handle and received through the consumer handle. As a safe general solution,
* always pass in a {@link CachingConnectionFactory} into this transaction manager's

View File

@@ -77,8 +77,8 @@ public class JmsTransactionManager102 extends JmsTransactionManager {
* This tells the JMS 1.0.2 provider which class hierarchy to use for creating
* Connections and Sessions.
* <p>Default is Point-to-Point (Queues).
* @param pubSubDomain <code>true</code> for Publish/Subscribe domain (Topics),
* <code>false</code> for Point-to-Point domain (Queues)
* @param pubSubDomain {@code true} for Publish/Subscribe domain (Topics),
* {@code false} for Point-to-Point domain (Queues)
*/
public void setPubSubDomain(boolean pubSubDomain) {
this.pubSubDomain = pubSubDomain;

View File

@@ -34,7 +34,7 @@ public interface SessionProxy extends Session {
* Return the target Session of this proxy.
* <p>This will typically be the native provider Session
* or a wrapper from a session pool.
* @return the underlying Session (never <code>null</code>)
* @return the underlying Session (never {@code null})
*/
Session getTargetSession();

View File

@@ -52,8 +52,8 @@ import org.springframework.util.Assert;
*
* <p>Note that when using the JMS 1.0.2 API, this ConnectionFactory will switch
* into queue/topic mode according to the JMS API methods used at runtime:
* <code>createQueueConnection</code> and <code>createTopicConnection</code> will
* lead to queue/topic mode, respectively; generic <code>createConnection</code>
* {@code createQueueConnection} and {@code createTopicConnection} will
* lead to queue/topic mode, respectively; generic {@code createConnection}
* calls will lead to a JMS 1.1 connection which is able to serve both modes.
*
* <p>Useful for testing and standalone environments in order to keep using the
@@ -367,14 +367,14 @@ public class SingleConnectionFactory
/**
* Template method for obtaining a (potentially cached) Session.
* <p>The default implementation always returns <code>null</code>.
* <p>The default implementation always returns {@code null}.
* Subclasses may override this for exposing specific Session handles,
* possibly delegating to {@link #createSession} for the creation of raw
* Session objects that will then get wrapped and returned from here.
* @param con the JMS Connection to operate on
* @param mode the Session acknowledgement mode
* (<code>Session.TRANSACTED</code> or one of the common modes)
* @return the Session to use, or <code>null</code> to indicate
* ({@code Session.TRANSACTED} or one of the common modes)
* @return the Session to use, or {@code null} to indicate
* creation of a raw standard Session
* @throws JMSException if thrown by the JMS API
*/
@@ -387,7 +387,7 @@ public class SingleConnectionFactory
* adaptign to JMS 1.0.2 style queue/topic mode if necessary.
* @param con the JMS Connection to operate on
* @param mode the Session acknowledgement mode
* (<code>Session.TRANSACTED</code> or one of the common modes)
* ({@code Session.TRANSACTED} or one of the common modes)
* @return the newly created Session
* @throws JMSException if thrown by the JMS API
*/

View File

@@ -71,8 +71,8 @@ public class SingleConnectionFactory102 extends SingleConnectionFactory {
* This tells the JMS 1.0.2 provider which class hierarchy to use for creating
* Connections and Sessions.
* <p>Default is Point-to-Point (Queues).
* @param pubSubDomain <code>true</code> for Publish/Subscribe domain (Topics),
* <code>false</code> for Point-to-Point domain (Queues)
* @param pubSubDomain {@code true} for Publish/Subscribe domain (Topics),
* {@code false} for Point-to-Point domain (Queues)
*/
public void setPubSubDomain(boolean pubSubDomain) {
this.pubSubDomain = pubSubDomain;

View File

@@ -20,7 +20,7 @@ import javax.jms.Connection;
import javax.jms.ConnectionFactory;
/**
* Extension of the <code>javax.jms.ConnectionFactory</code> interface,
* Extension of the {@code javax.jms.ConnectionFactory} interface,
* indicating how to release Connections obtained from it.
*
* @author Juergen Hoeller

View File

@@ -54,7 +54,7 @@ import org.springframework.util.Assert;
*
* <p>Delegates to {@link ConnectionFactoryUtils} for automatically participating
* in thread-bound transactions, for example managed by {@link JmsTransactionManager}.
* <code>createSession</code> calls and <code>close</code> calls on returned Sessions
* {@code createSession} calls and {@code close} calls on returned Sessions
* will behave properly within a transaction, that is, always work on the transactional
* Session. If not within a transaction, normal ConnectionFactory behavior applies.
*

View File

@@ -31,14 +31,14 @@ import org.springframework.util.StringUtils;
/**
* An adapter for a target JMS {@link javax.jms.ConnectionFactory}, applying the
* given user credentials to every standard <code>createConnection()</code> call,
* that is, implicitly invoking <code>createConnection(username, password)</code>
* given user credentials to every standard {@code createConnection()} call,
* that is, implicitly invoking {@code createConnection(username, password)}
* on the target. All other methods simply delegate to the corresponding methods
* of the target ConnectionFactory.
*
* <p>Can be used to proxy a target JNDI ConnectionFactory that does not have user
* credentials configured. Client code can work with the ConnectionFactory without
* passing in username and password on every <code>createConnection()</code> call.
* passing in username and password on every {@code createConnection()} call.
*
* <p>In the following example, client code can simply transparently work
* with the preconfigured "myConnectionFactory", implicitly accessing
@@ -56,7 +56,7 @@ import org.springframework.util.StringUtils;
* &lt;/bean></pre>
*
* <p>If the "username" is empty, this proxy will simply delegate to the standard
* <code>createConnection()</code> method of the target ConnectionFactory.
* {@code createConnection()} method of the target ConnectionFactory.
* This can be used to keep a UserCredentialsConnectionFactoryAdapter bean
* definition just for the <i>option</i> of implicitly passing in user credentials
* if the particular target ConnectionFactory requires it.
@@ -114,7 +114,7 @@ public class UserCredentialsConnectionFactoryAdapter
/**
* Set user credententials for this proxy and the current thread.
* The given username and password will be applied to all subsequent
* <code>createConnection()</code> calls on this ConnectionFactory proxy.
* {@code createConnection()} calls on this ConnectionFactory proxy.
* <p>This will override any statically specified user credentials,
* that is, values of the "username" and "password" bean properties.
* @param username the username to apply
@@ -159,10 +159,10 @@ public class UserCredentialsConnectionFactoryAdapter
}
/**
* This implementation delegates to the <code>createConnection(username, password)</code>
* This implementation delegates to the {@code createConnection(username, password)}
* method of the target ConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
* <code>createConnection()</code> method of the target ConnectionFactory.
* {@code createConnection()} method of the target ConnectionFactory.
* @param username the username to use
* @param password the password to use
* @return the Connection
@@ -204,10 +204,10 @@ public class UserCredentialsConnectionFactoryAdapter
}
/**
* This implementation delegates to the <code>createQueueConnection(username, password)</code>
* This implementation delegates to the {@code createQueueConnection(username, password)}
* method of the target QueueConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
* <code>createQueueConnection()</code> method of the target ConnectionFactory.
* {@code createQueueConnection()} method of the target ConnectionFactory.
* @param username the username to use
* @param password the password to use
* @return the Connection
@@ -253,10 +253,10 @@ public class UserCredentialsConnectionFactoryAdapter
}
/**
* This implementation delegates to the <code>createTopicConnection(username, password)</code>
* This implementation delegates to the {@code createTopicConnection(username, password)}
* method of the target TopicConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
* <code>createTopicConnection()</code> method of the target ConnectionFactory.
* {@code createTopicConnection()} method of the target ConnectionFactory.
* @param username the username to use
* @param password the password to use
* @return the Connection

View File

@@ -36,9 +36,9 @@ public interface BrowserCallback<T> {
/**
* Perform operations on the given {@link javax.jms.Session} and {@link javax.jms.QueueBrowser}.
* <p>The message producer is not associated with any destination.
* @param session the JMS <code>Session</code> object to use
* @param browser the JMS <code>QueueBrowser</code> object to use
* @return a result object from working with the <code>Session</code>, if any (can be <code>null</code>)
* @param session the JMS {@code Session} object to use
* @param browser the JMS {@code QueueBrowser} object to use
* @return a result object from working with the {@code Session}, if any (can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session, QueueBrowser browser) throws JMSException;

View File

@@ -28,8 +28,8 @@ import org.springframework.jms.JmsException;
* <p>Implemented by {@link JmsTemplate}. Not often used but a useful option
* to enhance testability, as it can easily be mocked or stubbed.
*
* <p>Provides <code>JmsTemplate's</code> <code>send(..)</code> and
* <code>receive(..)</code> methods that mirror various JMS API methods.
* <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.
*
* @author Mark Pollack
@@ -198,7 +198,7 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* <p>This will only work with a default destination specified!
* @return the message received by the consumer, or <code>null</code> if the timeout expires
* @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receive() throws JmsException;
@@ -209,7 +209,7 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
* @return the message received by the consumer, or <code>null</code> if the timeout expires
* @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receive(Destination destination) throws JmsException;
@@ -221,7 +221,7 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
* @return the message received by the consumer, or <code>null</code> if the timeout expires
* @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receive(String destinationName) throws JmsException;
@@ -232,9 +232,9 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* <p>This will only work with a default destination specified!
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @return the message received by the consumer, or <code>null</code> if the timeout expires
* @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receiveSelected(String messageSelector) throws JmsException;
@@ -245,9 +245,9 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @return the message received by the consumer, or <code>null</code> if the timeout expires
* @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receiveSelected(Destination destination, String messageSelector) throws JmsException;
@@ -259,9 +259,9 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @return the message received by the consumer, or <code>null</code> if the timeout expires
* @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receiveSelected(String destinationName, String messageSelector) throws JmsException;
@@ -278,7 +278,7 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* <p>This will only work with a default destination specified!
* @return the message produced for the consumer or <code>null</code> if the timeout expires.
* @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveAndConvert() throws JmsException;
@@ -290,7 +290,7 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
* @return the message produced for the consumer or <code>null</code> if the timeout expires.
* @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveAndConvert(Destination destination) throws JmsException;
@@ -303,7 +303,7 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
* @return the message produced for the consumer or <code>null</code> if the timeout expires.
* @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveAndConvert(String destinationName) throws JmsException;
@@ -315,9 +315,9 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* <p>This will only work with a default destination specified!
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @return the message produced for the consumer or <code>null</code> if the timeout expires.
* @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveSelectedAndConvert(String messageSelector) throws JmsException;
@@ -329,9 +329,9 @@ public interface JmsOperations {
* <p>This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @return the message produced for the consumer or <code>null</code> if the timeout expires.
* @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException;
@@ -344,9 +344,9 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @return the message produced for the consumer or <code>null</code> if the timeout expires.
* @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException;
@@ -389,7 +389,7 @@ public interface JmsOperations {
/**
* Browse selected messages in a JMS queue. The callback gives 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</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session
@@ -401,7 +401,7 @@ public interface JmsOperations {
* Browse selected messages in a JMS queue. The callback gives 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</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session
@@ -414,7 +414,7 @@ public interface JmsOperations {
* 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)
* @param messageSelector the JMS message selector expression (or <code>null</code> if none).
* @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session

View File

@@ -60,15 +60,15 @@ import org.springframework.util.Assert;
* respectively. These defaults can be overridden through the "destinationResolver"
* and "messageConverter" bean properties.
*
* <p><b>NOTE: The <code>ConnectionFactory</code> used with this template should
* <p><b>NOTE: The {@code ConnectionFactory} used with this template should
* return pooled Connections (or a single shared Connection) as well as pooled
* Sessions and MessageProducers. Otherwise, performance of ad-hoc JMS operations
* is going to suffer.</b> The simplest option is to use the Spring-provided
* {@link org.springframework.jms.connection.SingleConnectionFactory} as a
* decorator for your target <code>ConnectionFactory</code>, reusing a single
* decorator for your target {@code ConnectionFactory}, reusing a single
* JMS Connection in a thread-safe fashion; this is often good enough for the
* purpose of sending messages via this template. In a J2EE environment,
* make sure that the <code>ConnectionFactory</code> is obtained from the
* make sure that the {@code ConnectionFactory} is obtained from the
* application's environment naming context via JNDI; application servers
* typically expose pooled, transaction-aware factories there.
*
@@ -433,11 +433,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
/**
* Execute the action specified by the given action object within a
* JMS Session. Generalized version of <code>execute(SessionCallback)</code>,
* JMS Session. Generalized version of {@code execute(SessionCallback)},
* allowing the JMS Connection to be started on the fly.
* <p>Use <code>execute(SessionCallback)</code> for the general case.
* <p>Use {@code execute(SessionCallback)} for the general case.
* Starting the JMS Connection is just necessary for receiving messages,
* which is preferably achieved through the <code>receive</code> methods.
* which is preferably achieved through the {@code receive} methods.
* @param action callback object that exposes the Session
* @param startConnection whether to start the Connection
* @return the result object from working with the Session
@@ -712,8 +712,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* Receive a JMS message.
* @param session the JMS Session to operate on
* @param destination the JMS Destination to receive from
* @param messageSelector the message selector for this consumer (can be <code>null</code>)
* @return the JMS Message received, or <code>null</code> if none
* @param messageSelector the message selector for this consumer (can be {@code null})
* @return the JMS Message received, or {@code null} if none
* @throws JMSException if thrown by JMS API methods
*/
protected Message doReceive(Session session, Destination destination, String messageSelector)
@@ -726,7 +726,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* Actually receive a JMS message.
* @param session the JMS Session to operate on
* @param consumer the JMS MessageConsumer to receive with
* @return the JMS Message received, or <code>null</code> if none
* @return the JMS Message received, or {@code null} if none
* @throws JMSException if thrown by JMS API methods
*/
protected Message doReceive(Session session, MessageConsumer consumer) throws JMSException {
@@ -763,7 +763,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* Actually receive a message from the given consumer.
* @param consumer the JMS MessageConsumer to receive with
* @param timeout the receive timeout
* @return the JMS Message received, or <code>null</code> if none
* @return the JMS Message received, or {@code null} if none
* @throws JMSException if thrown by JMS API methods
*/
private Message doReceive(MessageConsumer consumer, long timeout) throws JMSException {
@@ -809,8 +809,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
/**
* Extract the content from the given JMS message.
* @param message the JMS Message to convert (can be <code>null</code>)
* @return the content of the message, or <code>null</code> if none
* @param message the JMS Message to convert (can be {@code null})
* @return the content of the message, or {@code null} if none
*/
protected Object doConvertFromMessage(Message message) {
if (message != null) {
@@ -902,7 +902,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* <p>This implementation accepts any JMS 1.1 Connection.
* @param holder the JmsResourceHolder
* @return an appropriate Connection fetched from the holder,
* or <code>null</code> if none found
* or {@code null} if none found
*/
protected Connection getConnection(JmsResourceHolder holder) {
return holder.getConnection();
@@ -913,7 +913,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* <p>This implementation accepts any JMS 1.1 Session.
* @param holder the JmsResourceHolder
* @return an appropriate Session fetched from the holder,
* or <code>null</code> if none found
* or {@code null} if none found
*/
protected Session getSession(JmsResourceHolder holder) {
return holder.getSession();
@@ -976,7 +976,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* <p>This implementation uses JMS 1.1 API.
* @param session the JMS Session to create a MessageConsumer for
* @param destination the JMS Destination to create a MessageConsumer for
* @param messageSelector the message selector for this consumer (can be <code>null</code>)
* @param messageSelector the message selector for this consumer (can be {@code null})
* @return the new JMS MessageConsumer
* @throws JMSException if thrown by JMS API methods
*/
@@ -1001,7 +1001,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* JMS MessageProducer, which needs to be specific to JMS 1.1 or 1.0.2.
* @param session the JMS Session to create a QueueBrowser for
* @param queue the JMS Queue to create a QueueBrowser for
* @param messageSelector the message selector for this consumer (can be <code>null</code>)
* @param messageSelector the message selector for this consumer (can be {@code null})
* @return the new JMS QueueBrowser
* @throws JMSException if thrown by JMS API methods
* @see #setMessageIdEnabled

View File

@@ -246,7 +246,7 @@ public class JmsTemplate102 extends JmsTemplate {
/**
* This implementation overrides the superclass method to avoid using
* JMS 1.1's Session <code>getAcknowledgeMode()</code> method.
* JMS 1.1's Session {@code getAcknowledgeMode()} method.
* The best we can do here is to check the setting on the template.
* @see #getSessionAcknowledgeMode()
*/

View File

@@ -23,14 +23,14 @@ import javax.jms.Session;
/**
* Creates a JMS message given a {@link Session}.
*
* <p>The <code>Session</code> typically is provided by an instance
* <p>The {@code Session} typically is provided by an instance
* of the {@link JmsTemplate} class.
*
* <p>Implementations <i>do not</i> need to concern themselves with
* checked <code>JMSExceptions</code> (from the '<code>javax.jms</code>'
* checked {@code JMSExceptions} (from the '{@code javax.jms}'
* package) that may be thrown from operations they attempt. The
* <code>JmsTemplate</code> will catch and handle these
* <code>JMSExceptions</code> appropriately.
* {@code JmsTemplate} will catch and handle these
* {@code JMSExceptions} appropriately.
*
* @author Mark Pollack
* @since 1.1
@@ -40,8 +40,8 @@ public interface MessageCreator {
/**
* Create a {@link Message} to be sent.
* @param session the JMS {@link Session} to be used to create the
* <code>Message</code> (never <code>null</code>)
* @return the <code>Message</code> to be sent
* {@code Message} (never {@code null})
* @return the {@code Message} to be sent
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
Message createMessage(Session session) throws JMSException;

View File

@@ -44,9 +44,9 @@ public interface ProducerCallback<T> {
* Perform operations on the given {@link Session} and {@link MessageProducer}.
* <p>The message producer is not associated with any destination unless
* when specified in the JmsTemplate call.
* @param session the JMS <code>Session</code> object to use
* @param producer the JMS <code>MessageProducer</code> object to use
* @return a result object from working with the <code>Session</code>, if any (can be <code>null</code>)
* @param session the JMS {@code Session} object to use
* @param producer the JMS {@code MessageProducer} object to use
* @return a result object from working with the {@code Session}, if any (can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session, MessageProducer producer) throws JMSException;

View File

@@ -35,8 +35,8 @@ public interface SessionCallback<T> {
/**
* Execute any number of operations against the supplied JMS
* {@link Session}, possibly returning a result.
* @param session the JMS <code>Session</code>
* @return a result object from working with the <code>Session</code>, if any (so can be <code>null</code>)
* @param session the JMS {@code Session}
* @return a result object from working with the {@code Session}, if any (so can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session) throws JMSException;

View File

@@ -1,7 +1,6 @@
/**
*
* Classes supporting the <code>org.springframework.jms.core</code> package.
* Classes supporting the {@code org.springframework.jms.core} package.
* Contains a base class for JmsTemplate usage.
*
*/

View File

@@ -343,12 +343,12 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/**
* Check whether this container's listeners are generally allowed to run.
* <p>This implementation always returns <code>true</code>; the default 'running'
* <p>This implementation always returns {@code true}; the default 'running'
* state is purely determined by {@link #start()} / {@link #stop()}.
* <p>Subclasses may override this method to check against temporary
* conditions that prevent listeners from actually running. In other words,
* they may apply further restrictions to the 'running' state, returning
* <code>false</code> if such a restriction prevents listeners from running.
* {@code false} if such a restriction prevents listeners from running.
*/
protected boolean runningAllowed() {
return true;
@@ -470,7 +470,7 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/**
* Return the shared JMS Connection maintained by this container.
* Available after initialization.
* @return the shared Connection (never <code>null</code>)
* @return the shared Connection (never {@code null})
* @throws IllegalStateException if this container does not maintain a
* shared Connection, or if the Connection hasn't been initialized yet
* @see #sharedConnectionEnabled()
@@ -562,7 +562,7 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/**
* Reschedule the given task object immediately.
* <p>To be implemented by subclasses if they ever call
* <code>rescheduleTaskIfNecessary</code>.
* {@code rescheduleTaskIfNecessary}.
* This implementation throws an UnsupportedOperationException.
* @param task the task object to reschedule
* @see #rescheduleTaskIfNecessary

View File

@@ -164,7 +164,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
* Return the destination to receive messages from. Will be <code>null</code>
* Return the destination to receive messages from. Will be {@code null}
* if the configured destination is not an actual {@link Destination} type;
* c.f. {@link #setDestinationName(String) when the destination is a String}.
*/
@@ -181,7 +181,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* container picking up the new destination immediately (works e.g. with
* DefaultMessageListenerContainer, as long as the cache level is less than
* CACHE_CONSUMER). However, this is considered advanced usage; use it with care!
* @param destinationName the desired destination (can be <code>null</code>)
* @param destinationName the desired destination (can be {@code null})
* @see #setDestination(javax.jms.Destination)
*/
public void setDestinationName(String destinationName) {
@@ -191,7 +191,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Return the name of the destination to receive messages from.
* Will be <code>null</code> if the configured destination is not a
* Will be {@code null} if the configured destination is not a
* {@link String} type; c.f. {@link #setDestination(Destination) when
* it is an actual Destination}.
*/
@@ -201,14 +201,14 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Return a descriptive String for this container's JMS destination
* (never <code>null</code>).
* (never {@code null}).
*/
protected String getDestinationDescription() {
return this.destination.toString();
}
/**
* Set the JMS message selector expression (or <code>null</code> if none).
* Set the JMS message selector expression (or {@code null} if none).
* Default is none.
* <p>See the JMS specification for a detailed definition of selector expressions.
* <p>Note: The message selector may be replaced at runtime, with the listener
@@ -221,7 +221,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
* Return the JMS message selector expression (or <code>null</code> if none).
* Return the JMS message selector expression (or {@code null} if none).
*/
public String getMessageSelector() {
return this.messageSelector;
@@ -552,7 +552,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Invoke the specified listener as standard JMS MessageListener.
* <p>Default implementation performs a plain invocation of the
* <code>onMessage</code> method.
* {@code onMessage} method.
* @param listener the JMS MessageListener to invoke
* @param message the received JMS Message
* @throws JMSException if thrown by JMS API methods

View File

@@ -49,7 +49,7 @@ import org.springframework.transaction.support.TransactionSynchronizationUtils;
*
* <p>The underlying mechanism is based on standard JMS MessageConsumer handling,
* which is perfectly compatible with both native JMS and JMS in a J2EE environment.
* Neither the JMS <code>MessageConsumer.setMessageListener</code> facility
* Neither the JMS {@code MessageConsumer.setMessageListener} facility
* nor the JMS ServerSessionPool facility is required. A further advantage
* of this approach is full control over the listening process, allowing for
* custom scaling and throttling and of concurrent message processing
@@ -270,7 +270,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
* fetching all requires resources and invoking the listener.
* @param session the JMS Session to work on
* @param consumer the MessageConsumer to work on
* @param status the TransactionStatus (may be <code>null</code>)
* @param status the TransactionStatus (may be {@code null})
* @return whether a message has been received
* @throws JMSException if thrown by JMS methods
* @see #doExecuteListener(javax.jms.Session, javax.jms.Message)
@@ -424,7 +424,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
/**
* Receive a message from the given consumer.
* @param consumer the MessageConsumer to use
* @return the Message, or <code>null</code> if none
* @return the Message, or {@code null} if none
* @throws JMSException if thrown by JMS methods
*/
protected Message receiveMessage(MessageConsumer consumer) throws JMSException {
@@ -461,7 +461,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
* <p>This implementation accepts any JMS 1.1 Connection.
* @param holder the JmsResourceHolder
* @return an appropriate Connection fetched from the holder,
* or <code>null</code> if none found
* or {@code null} if none found
*/
protected Connection getConnection(JmsResourceHolder holder) {
return holder.getConnection();
@@ -472,7 +472,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
* <p>This implementation accepts any JMS 1.1 Session.
* @param holder the JmsResourceHolder
* @return an appropriate Session fetched from the holder,
* or <code>null</code> if none found
* or {@code null} if none found
*/
protected Session getSession(JmsResourceHolder holder) {
return holder.getSession();

View File

@@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
/**
* Message listener container variant that uses plain JMS client APIs, specifically
* a loop of <code>MessageConsumer.receive()</code> calls that also allow for
* a loop of {@code MessageConsumer.receive()} calls that also allow for
* transactional reception of messages (registering them with XA transactions).
* Designed to work in a native JMS environment as well as in a J2EE environment,
* with only minimal differences in configuration.
@@ -562,7 +562,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
/**
* Stop this listener container, invoking the specific callback
* once all listener processing has actually stopped.
* <p>Note: Further <code>stop(runnable)</code> calls (before processing
* <p>Note: Further {@code stop(runnable)} calls (before processing
* has actually stopped) will override the specified callback. Only the
* latest specified callback will be invoked.
* <p>If a subsequent {@link #start()} call restarts the listener container
@@ -617,8 +617,8 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
* not to miss any messages that are just about to be published.
* <p>This method may be polled after a {@link #start()} call, until asynchronous
* registration of consumers has happened which is when the method will start returning
* <code>true</code> &ndash; provided that the listener container ever actually establishes
* a fixed registration. It will then keep returning <code>true</code> until shutdown,
* {@code true} &ndash; provided that the listener container ever actually establishes
* a fixed registration. It will then keep returning {@code true} until shutdown,
* since the container will hold on to at least one consumer registration thereafter.
* <p>Note that a listener container is not bound to having a fixed registration in
* the first place. It may also keep recreating consumers for every invoker execution.
@@ -765,7 +765,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
/**
* This implementations proceeds even after an exception thrown from
* <code>Connection.start()</code>, relying on listeners to perform
* {@code Connection.start()}, relying on listeners to perform
* appropriate recovery.
*/
@Override
@@ -780,7 +780,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
/**
* This implementations proceeds even after an exception thrown from
* <code>Connection.stop()</code>, relying on listeners to perform
* {@code Connection.stop()}, relying on listeners to perform
* appropriate recovery after a restart.
*/
@Override
@@ -931,7 +931,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
//-------------------------------------------------------------------------
/**
* Runnable that performs looped <code>MessageConsumer.receive()</code> calls.
* Runnable that performs looped {@code MessageConsumer.receive()} calls.
*/
private class AsyncMessageListenerInvoker implements SchedulingAwareRunnable {

View File

@@ -107,7 +107,7 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
/**
* This implementation overrides the superclass method to avoid using
* JMS 1.1's Session <code>getAcknowledgeMode()</code> method.
* JMS 1.1's Session {@code getAcknowledgeMode()} method.
* The best we can do here is to check the setting on the listener container.
*/
protected boolean isClientAcknowledge(Session session) throws JMSException {

View File

@@ -47,8 +47,8 @@ public interface SessionAwareMessageListener<M extends Message> {
* Callback for processing a received JMS message.
* <p>Implementors are supposed to process the given Message,
* typically sending reply messages through the given Session.
* @param message the received JMS message (never <code>null</code>)
* @param session the underlying JMS Session (never <code>null</code>)
* @param message the received JMS message (never {@code null})
* @param session the underlying JMS Session (never {@code null})
* @throws JMSException if thrown by JMS methods
*/
void onMessage(M message, Session session) throws JMSException;

View File

@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
/**
* Message listener container that uses the plain JMS client API's
* <code>MessageConsumer.setMessageListener()</code> method to
* {@code MessageConsumer.setMessageListener()} method to
* create concurrent MessageConsumers for the specified listeners.
*
* <p>This is the simplest form of a message listener container.
@@ -48,7 +48,7 @@ import org.springframework.util.Assert;
* on acknowledge modes and transaction options.
*
* <p>For a different style of MessageListener handling, through looped
* <code>MessageConsumer.receive()</code> calls that also allow for
* {@code MessageConsumer.receive()} calls that also allow for
* transactional reception of messages (registering them with XA transactions),
* see {@link DefaultMessageListenerContainer}.
*

View File

@@ -89,7 +89,7 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont
/**
* This implementation overrides the superclass method to avoid using
* JMS 1.1's Session <code>getAcknowledgeMode()</code> method.
* JMS 1.1's Session {@code getAcknowledgeMode()} method.
* The best we can do here is to check the setting on the listener container.
*/
protected boolean isClientAcknowledge(Session session) throws JMSException {

View File

@@ -53,11 +53,11 @@ import org.springframework.util.ObjectUtils;
* JMS {@link MessageConverter}. By default, a {@link SimpleMessageConverter}
* will be used. (If you do not want such automatic message conversion taking
* place, then be sure to set the {@link #setMessageConverter MessageConverter}
* to <code>null</code>.)
* to {@code null}.)
*
* <p>If a target listener method returns a non-null object (typically of a
* message content type such as <code>String</code> or byte array), it will get
* wrapped in a JMS <code>Message</code> and sent to the response destination
* message content type such as {@code String} or byte array), it will get
* wrapped in a JMS {@code Message} and sent to the response destination
* (either the JMS "reply-to" destination or a
* {@link #setDefaultResponseDestination(javax.jms.Destination) specified default
* destination}).
@@ -68,10 +68,10 @@ import org.springframework.util.ObjectUtils;
* does <i>not</i> support the generation of response messages.
*
* <p>Find below some examples of method signatures compliant with this
* adapter class. This first example handles all <code>Message</code> types
* and gets passed the contents of each <code>Message</code> type as an
* argument. No <code>Message</code> will be sent back as all of these
* methods return <code>void</code>.
* adapter class. This first example handles all {@code Message} types
* and gets passed the contents of each {@code Message} type as an
* argument. No {@code Message} will be sent back as all of these
* methods return {@code void}.
*
* <pre class="code">public interface MessageContentsDelegate {
* void handleMessage(String text);
@@ -80,10 +80,10 @@ import org.springframework.util.ObjectUtils;
* void handleMessage(Serializable obj);
* }</pre>
*
* This next example handles all <code>Message</code> types and gets
* passed the actual (raw) <code>Message</code> as an argument. Again, no
* <code>Message</code> will be sent back as all of these methods return
* <code>void</code>.
* This next example handles all {@code Message} types and gets
* passed the actual (raw) {@code Message} as an argument. Again, no
* {@code Message} will be sent back as all of these methods return
* {@code void}.
*
* <pre class="code">public interface RawMessageDelegate {
* void handleMessage(TextMessage message);
@@ -92,22 +92,22 @@ import org.springframework.util.ObjectUtils;
* void handleMessage(ObjectMessage message);
* }</pre>
*
* This next example illustrates a <code>Message</code> delegate
* that just consumes the <code>String</code> contents of
* This next example illustrates a {@code Message} delegate
* that just consumes the {@code String} contents of
* {@link javax.jms.TextMessage TextMessages}. Notice also how the
* name of the <code>Message</code> handling method is different from the
* name of the {@code Message} handling method is different from the
* {@link #ORIGINAL_DEFAULT_LISTENER_METHOD original} (this will have to
* be configured in the attandant bean definition). Again, no <code>Message</code>
* will be sent back as the method returns <code>void</code>.
* be configured in the attandant bean definition). Again, no {@code Message}
* will be sent back as the method returns {@code void}.
*
* <pre class="code">public interface TextMessageContentDelegate {
* void onMessage(String text);
* }</pre>
*
* This final example illustrates a <code>Message</code> delegate
* that just consumes the <code>String</code> contents of
* This final example illustrates a {@code Message} delegate
* that just consumes the {@code String} contents of
* {@link javax.jms.TextMessage TextMessages}. Notice how the return type
* of this method is <code>String</code>: This will result in the configured
* of this method is {@code String}: This will result in the configured
* {@link MessageListenerAdapter} sending a {@link javax.jms.TextMessage} in response.
*
* <pre class="code">public interface ResponsiveTextMessageContentDelegate {
@@ -396,7 +396,7 @@ public class MessageListenerAdapter
/**
* Extract the message body from the given JMS message.
* @param message the JMS <code>Message</code>
* @param message the JMS {@code Message}
* @return the content of the message, to be passed into the
* listener method as argument
* @throws JMSException if thrown by JMS API methods
@@ -417,7 +417,7 @@ public class MessageListenerAdapter
* @param originalMessage the JMS request message
* @param extractedMessage the converted JMS request message,
* to be passed into the listener method as argument
* @return the name of the listener method (never <code>null</code>)
* @return the name of the listener method (never {@code null})
* @throws JMSException if thrown by JMS API methods
* @see #setDefaultListenerMethod
*/
@@ -482,9 +482,9 @@ public class MessageListenerAdapter
/**
* Handle the given result object returned from the listener method,
* sending a response message back.
* @param result the result object to handle (never <code>null</code>)
* @param result the result object to handle (never {@code null})
* @param request the original request message
* @param session the JMS Session to operate on (may be <code>null</code>)
* @param session the JMS Session to operate on (may be {@code null})
* @throws JMSException if thrown by JMS API methods
* @see #buildMessage
* @see #postProcessResponse
@@ -514,7 +514,7 @@ public class MessageListenerAdapter
* Build a JMS message to be sent as response based on the given result object.
* @param session the JMS Session to operate on
* @param result the content of the message, as returned from the listener method
* @return the JMS <code>Message</code> (never <code>null</code>)
* @return the JMS {@code Message} (never {@code null})
* @throws JMSException if thrown by JMS API methods
* @see #setMessageConverter
*/
@@ -553,15 +553,15 @@ public class MessageListenerAdapter
/**
* Determine a response destination for the given message.
* <p>The default implementation first checks the JMS Reply-To
* {@link Destination} of the supplied request; if that is not <code>null</code>
* it is returned; if it is <code>null</code>, then the configured
* {@link Destination} of the supplied request; if that is not {@code null}
* it is returned; if it is {@code null}, then the configured
* {@link #resolveDefaultResponseDestination default response destination}
* is returned; if this too is <code>null</code>, then an
* is returned; if this too is {@code null}, then an
* {@link InvalidDestinationException} is thrown.
* @param request the original incoming JMS message
* @param response the outgoing JMS message about to be sent
* @param session the JMS Session to operate on
* @return the response destination (never <code>null</code>)
* @return the response destination (never {@code null})
* @throws JMSException if thrown by JMS API methods
* @throws InvalidDestinationException if no {@link Destination} can be determined
* @see #setDefaultResponseDestination

View File

@@ -164,7 +164,7 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
}
/**
* This implementation maps <code>SESSION_TRANSACTED</code> onto an
* This implementation maps {@code SESSION_TRANSACTED} onto an
* ActivationSpec property named "useRAManagedTransaction", if available
* (following ActiveMQ's naming conventions).
*/

View File

@@ -112,7 +112,7 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory {
* Internal exception thrown when a ResourceExeption has been encountered
* during the endpoint invocation.
* <p>Will only be used if the ResourceAdapter does not invoke the
* endpoint's <code>beforeDelivery</code> and <code>afterDelivery</code>
* endpoint's {@code beforeDelivery} and {@code afterDelivery}
* directly, leavng it up to the concrete endpoint to apply those -
* and to handle any ResourceExceptions thrown from them.
*/

View File

@@ -113,7 +113,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
* Determine the ActivationSpec class for the given ResourceAdapter,
* if possible. Called if no 'activationSpecClass' has been set explicitly
* @param adapter the ResourceAdapter to check
* @return the corresponding ActivationSpec class, or <code>null</code>
* @return the corresponding ActivationSpec class, or {@code null}
* if not determinable
* @see #setActivationSpecClass
*/
@@ -170,7 +170,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
* Apply the specified acknowledge mode to the ActivationSpec object.
* <p>This implementation applies the standard JCA 1.5 acknowledge modes
* "Auto-acknowledge" and "Dups-ok-acknowledge". It throws an exception in
* case of <code>CLIENT_ACKNOWLEDGE</code> or <code>SESSION_TRANSACTED</code>
* case of {@code CLIENT_ACKNOWLEDGE} or {@code SESSION_TRANSACTED}
* having been requested.
* @param bw the BeanWrapper wrapping the ActivationSpec object
* @param ackMode the configured acknowledge mode

View File

@@ -378,7 +378,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
* Extract the invocation result from the response message.
* <p>The default implementation expects a JMS ObjectMessage carrying
* a RemoteInvocationResult object. If an invalid response message is
* encountered, the <code>onInvalidResponse</code> callback gets invoked.
* encountered, the {@code onInvalidResponse} callback gets invoked.
* @param responseMessage the response message
* @return the invocation result
* @throws JMSException is thrown if a JMS exception occurs
@@ -393,7 +393,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Callback that is invoked by <code>extractInvocationResult</code>
* Callback that is invoked by {@code extractInvocationResult}
* when it encounters an invalid response message.
* <p>The default implementation throws a MessageFormatException.
* @param responseMessage the invalid response message

View File

@@ -53,8 +53,8 @@ public class JmsInvokerProxyFactoryBean extends JmsInvokerClientInterceptor
/**
* Set the interface that the proxy must implement.
* @param serviceInterface the interface that the proxy must implement
* @throws IllegalArgumentException if the supplied <code>serviceInterface</code>
* is <code>null</code>, or if the supplied <code>serviceInterface</code>
* @throws IllegalArgumentException if the supplied {@code serviceInterface}
* is {@code null}, or if the supplied {@code serviceInterface}
* is not an interface type
*/
public void setServiceInterface(Class serviceInterface) {

View File

@@ -105,7 +105,7 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter
/**
* Read a RemoteInvocation from the given JMS message.
* @param requestMessage current request message
* @return the RemoteInvocation object (or <code>null</code>
* @return the RemoteInvocation object (or {@code null}
* in case of an invalid message that will simply be ignored)
* @throws javax.jms.JMSException in case of message access failure
*/
@@ -170,7 +170,7 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter
* flag, which is set to "true" (that is, discard invalid messages) by default.
* @param requestMessage the invalid request message
* @return the RemoteInvocation to expose for the invalid request (typically
* <code>null</code> in case of an invalid message that will simply be ignored)
* {@code null} in case of an invalid message that will simply be ignored)
* @throws javax.jms.JMSException in case of the invalid request supposed
* to lead to an exception (instead of ignoring it)
* @see #readRemoteInvocation

View File

@@ -78,7 +78,7 @@ public abstract class JmsAccessor implements InitializingBean {
* Set the transaction mode that is used when creating a JMS {@link Session}.
* Default is "false".
* <p>Note that within a JTA transaction, the parameters passed to
* <code>create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)</code>
* {@code create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)}
* method are not taken into account. Depending on the J2EE transaction context,
* the container makes its own decisions on these values. Analogously, these
* parameters are not taken into account within a locally managed transaction
@@ -159,10 +159,10 @@ public abstract class JmsAccessor implements InitializingBean {
* a Spring runtime {@link org.springframework.jms.JmsException JmsException}
* equivalent.
* <p>The default implementation delegates to the
* {@link org.springframework.jms.support.JmsUtils#convertJmsAccessException} method.
* {@link JmsUtils#convertJmsAccessException} method.
* @param ex the original checked {@link JMSException} to convert
* @return the Spring runtime {@link JmsException} wrapping <code>ex</code>
* @see org.springframework.jms.support.JmsUtils#convertJmsAccessException
* @return the Spring runtime {@link JmsException} wrapping {@code ex}
* @see JmsUtils#convertJmsAccessException
*/
protected JmsException convertJmsAccessException(JMSException ex) {
return JmsUtils.convertJmsAccessException(ex);

View File

@@ -56,8 +56,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS Connection and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param con the JMS Connection to close (may be <code>null</code>)
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param con the JMS Connection to close (may be {@code null})
*/
public static void closeConnection(Connection con) {
closeConnection(con, false);
@@ -65,9 +65,9 @@ public abstract class JmsUtils {
/**
* Close the given JMS Connection and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param con the JMS Connection to close (may be <code>null</code>)
* @param stop whether to call <code>stop()</code> before closing
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param con the JMS Connection to close (may be {@code null})
* @param stop whether to call {@code stop()} before closing
*/
public static void closeConnection(Connection con, boolean stop) {
if (con != null) {
@@ -99,8 +99,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS Session and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param session the JMS Session to close (may be <code>null</code>)
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param session the JMS Session to close (may be {@code null})
*/
public static void closeSession(Session session) {
if (session != null) {
@@ -119,8 +119,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS MessageProducer and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param producer the JMS MessageProducer to close (may be <code>null</code>)
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param producer the JMS MessageProducer to close (may be {@code null})
*/
public static void closeMessageProducer(MessageProducer producer) {
if (producer != null) {
@@ -139,8 +139,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS MessageConsumer and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param consumer the JMS MessageConsumer to close (may be <code>null</code>)
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param consumer the JMS MessageConsumer to close (may be {@code null})
*/
public static void closeMessageConsumer(MessageConsumer consumer) {
if (consumer != null) {
@@ -168,8 +168,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS QueueBrowser and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param browser the JMS QueueBrowser to close (may be <code>null</code>)
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param browser the JMS QueueBrowser to close (may be {@code null})
*/
public static void closeQueueBrowser(QueueBrowser browser) {
if (browser != null) {
@@ -188,8 +188,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS QueueRequestor and ignore any thrown exception.
* This is useful for typical <code>finally</code> blocks in manual JMS code.
* @param requestor the JMS QueueRequestor to close (may be <code>null</code>)
* This is useful for typical {@code finally} blocks in manual JMS code.
* @param requestor the JMS QueueRequestor to close (may be {@code null})
*/
public static void closeQueueRequestor(QueueRequestor requestor) {
if (requestor != null) {

View File

@@ -59,7 +59,7 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
/**
* Construct a new <code>MarshallingMessageConverter</code> with no {@link Marshaller}
* Construct a new {@code MarshallingMessageConverter} with no {@link Marshaller}
* or {@link Unmarshaller} set. The marshaller must be set after construction by invoking
* {@link #setMarshaller(Marshaller)} and {@link #setUnmarshaller(Unmarshaller)} .
*/
@@ -67,13 +67,13 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
}
/**
* Construct a new <code>MarshallingMessageConverter</code> with the given {@link Marshaller} set.
* Construct a new {@code MarshallingMessageConverter} with the given {@link Marshaller} set.
* <p>If the given {@link Marshaller} also implements the {@link Unmarshaller} interface,
* it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown.
* <p>Note that all {@link Marshaller} implementations in Spring also implement the
* {@link Unmarshaller} interface, so that you can safely use this constructor.
* @param marshaller object used as marshaller and unmarshaller
* @throws IllegalArgumentException when <code>marshaller</code> does not implement the
* @throws IllegalArgumentException when {@code marshaller} does not implement the
* {@link Unmarshaller} interface as well
*/
public MarshallingMessageConverter(Marshaller marshaller) {
@@ -91,7 +91,7 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
}
/**
* Construct a new <code>MarshallingMessageConverter</code> with the
* Construct a new {@code MarshallingMessageConverter} with the
* given Marshaller and Unmarshaller.
* @param marshaller the Marshaller to use
* @param unmarshaller the Unmarshaller to use

View File

@@ -34,7 +34,7 @@ import org.springframework.util.ObjectUtils;
* A simple message converter which is able to handle TextMessages, BytesMessages,
* MapMessages, and ObjectMessages. Used as default conversion strategy
* by {@link org.springframework.jms.core.JmsTemplate}, for
* <code>convertAndSend</code> and <code>receiveAndConvert</code> operations.
* {@code convertAndSend} and {@code receiveAndConvert} operations.
*
* <p>Converts a String to a {@link javax.jms.TextMessage}, a byte array to a
* {@link javax.jms.BytesMessage}, a Map to a {@link javax.jms.MapMessage}, and

View File

@@ -28,7 +28,7 @@ import javax.jms.JMSException;
* as SimpleMessageConverter does for JMS 1.1 providers.
*
* <p>The only difference to the default SimpleMessageConverter is that BytesMessage
* is handled differently: namely, without using the <code>getBodyLength()</code>
* is handled differently: namely, without using the {@code getBodyLength()}
* method which has been introduced in JMS 1.1 and is therefore not available on a
* JMS 1.0.2 provider.
*
@@ -46,7 +46,7 @@ public class SimpleMessageConverter102 extends SimpleMessageConverter {
/**
* Overrides superclass method to copy bytes from the message into a
* ByteArrayOutputStream, using a buffer, to avoid using the
* <code>getBodyLength()</code> method which has been introduced in
* {@code getBodyLength()} method which has been introduced in
* JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.
* @see javax.jms.BytesMessage#getBodyLength()
*/

View File

@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* {@link DestinationResolver} implementation based on a Spring {@link BeanFactory}.
*
* <p>Will lookup Spring managed beans identified by bean name,
* expecting them to be of type <code>javax.jms.Destination</code>.
* expecting them to be of type {@code javax.jms.Destination}.
*
* @author Juergen Hoeller
* @since 2.5
@@ -42,7 +42,7 @@ public class BeanFactoryDestinationResolver implements DestinationResolver, Bean
/**
* Create a new instance of the {@link BeanFactoryDestinationResolver} class.
* <p>The BeanFactory to access must be set via <code>setBeanFactory</code>.
* <p>The BeanFactory to access must be set via {@code setBeanFactory}.
* @see #setBeanFactory
*/
public BeanFactoryDestinationResolver() {

View File

@@ -44,9 +44,9 @@ public interface DestinationResolver {
* Resolve the given destination name, either as located resource
* or as dynamic destination.
* @param session the current JMS Session
* (may be <code>null</code> if the resolver implementation is able to work without it)
* (may be {@code null} if the resolver implementation is able to work without it)
* @param destinationName the name of the destination
* @param pubSubDomain <code>true</code> if the domain is pub-sub, <code>false</code> if P2P
* @param pubSubDomain {@code true} if the domain is pub-sub, {@code false} if P2P
* @return the JMS destination (either a topic or a queue)
* @throws javax.jms.JMSException if the JMS Session failed to resolve the destination
* @throws DestinationResolutionException in case of general destination resolution failure

View File

@@ -48,7 +48,7 @@ public class DynamicDestinationResolver implements DestinationResolver {
* Resolve the specified destination name as a dynamic destination.
* @param session the current JMS Session
* @param destinationName the name of the destination
* @param pubSubDomain <code>true</code> if the domain is pub-sub, <code>false</code> if P2P
* @param pubSubDomain {@code true} if the domain is pub-sub, {@code false} if P2P
* @return the JMS destination (either a topic or a queue)
* @throws javax.jms.JMSException if resolution failed
* @see #resolveTopic(javax.jms.Session, String)

View File

@@ -57,7 +57,7 @@ public abstract class JmsDestinationAccessor extends JmsAccessor {
}
/**
* Return the DestinationResolver for this accessor (never <code>null</code>).
* Return the DestinationResolver for this accessor (never {@code null}).
*/
public DestinationResolver getDestinationResolver() {
return this.destinationResolver;

View File

@@ -135,8 +135,8 @@ public class JndiDestinationResolver extends JndiLocatorSupport implements Cachi
* the expected type.
* @param destination the Destination object to validate
* @param destinationName the name of the destination
* @param pubSubDomain <code>true</code> if a Topic is expected,
* <code>false</code> in case of a Queue
* @param pubSubDomain {@code true} if a Topic is expected,
* {@code false} in case of a Queue
*/
protected void validateDestination(Destination destination, String destinationName, boolean pubSubDomain) {
Class targetClass = Queue.class;