activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: NO-JIRA Add ability to set message reply-to for in tests
Date Thu, 06 Oct 2016 19:51:41 GMT
Repository: activemq
Updated Branches:
  refs/heads/master a2995b761 -> 1316b57ed


NO-JIRA Add ability to set message reply-to for in tests

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/1316b57e
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/1316b57e
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/1316b57e

Branch: refs/heads/master
Commit: 1316b57edba75336e02645abc3a7e8369526b2e8
Parents: a2995b7
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Oct 6 15:51:31 2016 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Oct 6 15:51:31 2016 -0400

----------------------------------------------------------------------
 .../transport/amqp/client/AmqpMessage.java      | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/1316b57e/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
index e5e1bbd..952f98d 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpMessage.java
@@ -239,6 +239,31 @@ public class AmqpMessage {
     }
 
     /**
+     * Sets the address which is applied to the AMQP message ReplyTo field in the message
properties
+     *
+     * @param replyTo
+     *      The address that should be applied in the Message ReplyTo field.
+     */
+    public void setReplyTo(String replyTo) {
+        checkReadOnly();
+        lazyCreateProperties();
+        getWrappedMessage().setReplyTo(replyTo);
+    }
+
+    /**
+     * Return the set address that was set in the Message ReplyTo field.
+     *
+     * @return the set address String form or null if not set.
+     */
+    public String getReplyTo() {
+        if (message.getProperties() == null) {
+            return null;
+        }
+
+        return message.getProperties().getReplyTo();
+    }
+
+    /**
      * Sets the MessageId property on an outbound message using the provided String
      *
      * @param messageId


Mime
View raw message