diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-06-28 03:03:30 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-06-28 03:03:30 +0000 |
commit | 05c37ead555f16c64334c7d351566b57b07c4557 (patch) | |
tree | 3a8c5ca616b05c83a432f9210b276dbd6c8280ce | |
parent | 54ab687c1cde7c801693e133683f63811148d110 (diff) | |
download | qpid-python-05c37ead555f16c64334c7d351566b57b07c4557.tar.gz |
QPID-3302 You can now get and set the app-id in AMQP 0-10 message properties using "x-amqp-0-10.app-id".
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1140412 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java index fb7b191656..c9a42638b5 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java @@ -634,6 +634,11 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate { return new String(_messageProps.getUserId()); } + else if ("x-amqp-0-10.app-id".equals(propertyName) && + _messageProps.getAppId() != null) + { + return new String(_messageProps.getAppId()); + } else { checkPropertyName(propertyName); @@ -740,7 +745,14 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate { checkPropertyName(propertyName); checkWritableProperties(); - setApplicationHeader(propertyName, value); + if ("x-amqp-0-10.app-id".equals(propertyName)) + { + _messageProps.setAppId(value.getBytes()); + } + else + { + setApplicationHeader(propertyName, value); + } } private static final Set<Class> ALLOWED = new HashSet(); |