Skip to content

Commit e0d79f5

Browse files
committed
Merge branch '5.2.x'
2 parents 88ccab8 + bd65762 commit e0d79f5

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

spring-jms/src/main/java/org/springframework/jms/core/MessagePostProcessor.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2005 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,25 +20,28 @@
2020
import javax.jms.Message;
2121

2222
/**
23-
* To be used with JmsTemplate's send method that convert an object to a message.
24-
* It allows for further modification of the message after it has been processed
25-
* by the converter. This is useful for setting of JMS Header and Properties.
23+
* To be used with JmsTemplate's send method that converts an object to a message.
2624
*
27-
* <p>This often as an anonymous class within a method implementation.
25+
* <p>This allows for further modification of the message after it has been processed
26+
* by the converter and is useful for setting JMS headers and properties.
27+
*
28+
* <p>Often implemented as a lambda expression or as an anonymous inner class.
2829
*
2930
* @author Mark Pollack
3031
* @since 1.1
3132
* @see JmsTemplate#convertAndSend(String, Object, MessagePostProcessor)
3233
* @see JmsTemplate#convertAndSend(javax.jms.Destination, Object, MessagePostProcessor)
3334
* @see org.springframework.jms.support.converter.MessageConverter
3435
*/
36+
@FunctionalInterface
3537
public interface MessagePostProcessor {
3638

3739
/**
38-
* Apply a MessagePostProcessor to the message. The returned message is
39-
* typically a modified version of the original.
40+
* Process the given message.
41+
* <p>The returned message is typically a modified version of the original.
4042
* @param message the JMS message from the MessageConverter
41-
* @return the modified version of the Message
43+
* @return a post-processed variant of the message, or simply the incoming
44+
* message; never {@code null}
4245
* @throws javax.jms.JMSException if thrown by JMS API methods
4346
*/
4447
Message postProcessMessage(Message message) throws JMSException;

spring-messaging/src/main/java/org/springframework/messaging/core/MessagePostProcessor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
* @see MessageSendingOperations
2929
* @see MessageRequestReplyOperations
3030
*/
31+
@FunctionalInterface
3132
public interface MessagePostProcessor {
3233

3334
/**
3435
* Process the given message.
3536
* @param message the message to process
36-
* @return a post-processed variant of the message,
37-
* or simply the incoming message; never {@code null}
37+
* @return a post-processed variant of the message, or simply the incoming
38+
* message; never {@code null}
3839
*/
3940
Message<?> postProcessMessage(Message<?> message);
4041

0 commit comments

Comments
 (0)