Skip to content

Commit

Permalink
Polish AbstractMessageListenerContainer Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jun 23, 2023
1 parent 9ccbeec commit 563b2a8
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
* 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>
Expand Down Expand Up @@ -496,8 +496,8 @@ public boolean isReplyPubSubDomain() {
/**
* 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) {
Expand Down Expand Up @@ -542,8 +542,8 @@ public ExceptionListener getExceptionListener() {
}

/**
* 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.
*/
Expand All @@ -552,8 +552,8 @@ public void setErrorHandler(@Nullable ErrorHandler errorHandler) {
}

/**
* 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
Expand Down Expand Up @@ -634,7 +634,7 @@ public void setupMessageListener(Object messageListener) {
* 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
Expand All @@ -653,7 +653,7 @@ protected void executeListener(Session session, Message message) {
* 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
Expand Down Expand Up @@ -684,7 +684,7 @@ protected void doExecuteListener(Session session, Message message) throws JMSExc
* 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
*/
Expand Down Expand Up @@ -713,7 +713,7 @@ else if (listener != null) {
* 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
Expand Down Expand Up @@ -749,11 +749,11 @@ protected void doInvokeListener(SessionAwareMessageListener listener, Session se
}

/**
* 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
*/
Expand All @@ -763,8 +763,8 @@ protected void doInvokeListener(MessageListener listener, Message message) throw

/**
* 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 {
Expand Down Expand Up @@ -917,7 +917,7 @@ protected void invokeExceptionListener(JMSException ex) {

/**
* 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) {
Expand All @@ -933,7 +933,7 @@ protected void invokeErrorHandler(Throwable ex) {

/**
* 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 {
Expand Down

0 comments on commit 563b2a8

Please sign in to comment.