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 | b7b5c2668cdab3ebb7a9938f5e8ffa32d38390b8 (patch) | |
| tree | c24354222858b2e7cf3465ecbc70db60d6279380 /java/client | |
| parent | 49f9cbb26f5a072ac60d8add9e01910f04ee3513 (diff) | |
| download | qpid-python-b7b5c2668cdab3ebb7a9938f5e8ffa32d38390b8.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/qpid@1140412 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
| -rw-r--r-- | 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/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java b/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java index fb7b191656..c9a42638b5 100644 --- a/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java +++ b/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(); |
