From bd6576258268ccfa3d3d81025e085995580ba629 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 10 Aug 2020 11:26:41 +0200 Subject: [PATCH] Polish Javadoc for MessagePostProcessor interfaces See gh-25571 --- .../jms/core/MessagePostProcessor.java | 18 ++++++++++-------- .../messaging/core/MessagePostProcessor.java | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/spring-jms/src/main/java/org/springframework/jms/core/MessagePostProcessor.java b/spring-jms/src/main/java/org/springframework/jms/core/MessagePostProcessor.java index bb7b80a90dc9..84c4c5da9445 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/MessagePostProcessor.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/MessagePostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,12 @@ import javax.jms.Message; /** - * To be used with JmsTemplate's send method that convert an object to a message. - * It allows for further modification of the message after it has been processed - * by the converter. This is useful for setting of JMS Header and Properties. + * To be used with JmsTemplate's send method that converts an object to a message. * - *

This often as an anonymous class within a method implementation. + *

This allows for further modification of the message after it has been processed + * by the converter and is useful for setting JMS headers and properties. + * + *

Often implemented as a lambda expression or as an anonymous inner class. * * @author Mark Pollack * @since 1.1 @@ -36,10 +37,11 @@ public interface MessagePostProcessor { /** - * Apply a MessagePostProcessor to the message. The returned message is - * typically a modified version of the original. + * Process the given message. + *

The returned message is typically a modified version of the original. * @param message the JMS message from the MessageConverter - * @return the modified version of the Message + * @return a post-processed variant of the message, or simply the incoming + * message; never {@code null} * @throws javax.jms.JMSException if thrown by JMS API methods */ Message postProcessMessage(Message message) throws JMSException; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/MessagePostProcessor.java b/spring-messaging/src/main/java/org/springframework/messaging/core/MessagePostProcessor.java index f4e6ceee4f64..04e3dfcaea92 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/core/MessagePostProcessor.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/core/MessagePostProcessor.java @@ -34,8 +34,8 @@ public interface MessagePostProcessor { /** * Process the given message. * @param message the message to process - * @return a post-processed variant of the message, - * or simply the incoming message; never {@code null} + * @return a post-processed variant of the message, or simply the incoming + * message; never {@code null} */ Message postProcessMessage(Message message);