Browse Source

Polish AbstractMessageListenerContainer Javadoc

pull/30724/head
Sam Brannen 1 year ago
parent
commit
563b2a8505
  1. 40
      spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java

40
spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java

@ -49,10 +49,10 @@ import org.springframework.util.ErrorHandler; @@ -49,10 +49,10 @@ import org.springframework.util.ErrorHandler;
* provider. Instead, it will log any such exception at the error level.
* This means that from the perspective of the attendant JMS provider no such
* listener will ever fail. However, if error handling is necessary, then
* any implementation of the {@link ErrorHandler} strategy may be provided to
* an implementation of the {@link ErrorHandler} strategy may be provided to
* the {@link #setErrorHandler(ErrorHandler)} method. Note that JMSExceptions
* <b>will</b> be passed to the ErrorHandler in addition to (but after) being
* passed to an {@link ExceptionListener}, if one has been provided.
* <b>will</b> be passed to the {@code ErrorHandler} in addition to (but after)
* being passed to an {@link ExceptionListener}, if one has been provided.
*
* <p>The listener container offers the following message acknowledgment options:
* <ul>
@ -496,8 +496,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -496,8 +496,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Configure the {@link QosSettings} to use when sending a reply. Can be set to
* {@code null} to indicate that the broker's defaults should be used.
* @param replyQosSettings the QoS settings to use when sending a reply or {@code null}
* to use the default vas.
* @param replyQosSettings the QoS settings to use when sending a reply, or
* {@code null} to use the default value
* @since 5.0
*/
public void setReplyQosSettings(@Nullable QosSettings replyQosSettings) {
@ -542,8 +542,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -542,8 +542,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
* Set the ErrorHandler to be invoked in case of any uncaught exceptions thrown
* while processing a Message.
* Set the {@link ErrorHandler} to be invoked in case of any uncaught exceptions
* thrown while processing a {@link Message}.
* <p>By default, there will be <b>no</b> ErrorHandler so that error-level
* logging is the only result.
*/
@ -552,8 +552,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -552,8 +552,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
* Return the ErrorHandler to be invoked in case of any uncaught exceptions thrown
* while processing a Message.
* Return the {@link ErrorHandler} to be invoked in case of any uncaught exceptions
* thrown while processing a {@link Message}.
* @since 4.1
*/
@Nullable
@ -634,7 +634,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -634,7 +634,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* Execute the specified listener,
* committing or rolling back the transaction afterwards (if necessary).
* @param session the JMS Session to operate on
* @param message the received JMS Message
* @param message the received JMS {@link Message}
* @see #invokeListener
* @see #commitIfNecessary
* @see #rollbackOnExceptionIfNecessary
@ -653,7 +653,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -653,7 +653,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* Execute the specified listener,
* committing or rolling back the transaction afterwards (if necessary).
* @param session the JMS Session to operate on
* @param message the received JMS Message
* @param message the received JMS {@link Message}
* @throws JMSException if thrown by JMS API methods
* @see #invokeListener
* @see #commitIfNecessary
@ -684,7 +684,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -684,7 +684,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* Invoke the specified listener: either as standard JMS MessageListener
* or (preferably) as Spring SessionAwareMessageListener.
* @param session the JMS Session to operate on
* @param message the received JMS Message
* @param message the received JMS {@link Message}
* @throws JMSException if thrown by JMS API methods
* @see #setMessageListener
*/
@ -713,7 +713,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -713,7 +713,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* to the listener if demanded.
* @param listener the Spring SessionAwareMessageListener to invoke
* @param session the JMS Session to operate on
* @param message the received JMS Message
* @param message the received JMS {@link Message}
* @throws JMSException if thrown by JMS API methods
* @see SessionAwareMessageListener
* @see #setExposeListenerSession
@ -749,11 +749,11 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -749,11 +749,11 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
* Invoke the specified listener as standard JMS MessageListener.
* Invoke the specified listener as standard JMS {@link MessageListener}.
* <p>Default implementation performs a plain invocation of the
* {@code onMessage} method.
* @param listener the JMS MessageListener to invoke
* @param message the received JMS Message
* @param listener the JMS {@code MessageListener} to invoke
* @param message the received JMS {@link Message}
* @throws JMSException if thrown by JMS API methods
* @see jakarta.jms.MessageListener#onMessage
*/
@ -763,8 +763,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -763,8 +763,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Perform a commit or message acknowledgement, as appropriate.
* @param session the JMS Session to commit
* @param message the Message to acknowledge
* @param session the JMS {@link Session} to commit
* @param message the {@link Message} to acknowledge
* @throws jakarta.jms.JMSException in case of commit failure
*/
protected void commitIfNecessary(Session session, @Nullable Message message) throws JMSException {
@ -917,7 +917,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -917,7 +917,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Invoke the registered ErrorHandler, if any. Log at warn level otherwise.
* @param ex the uncaught error that arose during JMS processing.
* @param ex the uncaught error that arose during JMS processing
* @see #setErrorHandler
*/
protected void invokeErrorHandler(Throwable ex) {
@ -933,7 +933,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen @@ -933,7 +933,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Internal exception class that indicates a rejected message on shutdown.
* Used to trigger a rollback for an external transaction manager in that case.
* <p>Used to trigger a rollback for an external transaction manager in that case.
*/
@SuppressWarnings("serial")
private static class MessageRejectedWhileStoppingException extends RuntimeException {

Loading…
Cancel
Save