diff options
author | Keith Wall <kwall@apache.org> | 2014-07-01 10:30:02 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2014-07-01 10:30:02 +0000 |
commit | cebcf0fed2169482427c1a27d2a778ac19acfc1c (patch) | |
tree | 3a0ff63acf47eb52cd2220038afa49df3c805846 /tools | |
parent | 9d989c9e56afc3d92af80ae6c9cb5577d1db233c (diff) | |
download | qpid-python-cebcf0fed2169482427c1a27d2a778ac19acfc1c.tar.gz |
QPID-5820: [Java QMF2 Plugin] changes to plugin owing to the Java Broker model updates made during 0.29
* Used model getters rather than named attributes wherever possible
Work done by Andrew MacBean <macbean@apache.org> and me.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1607034 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools')
4 files changed, 9 insertions, 9 deletions
diff --git a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Exchange.java b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Exchange.java index e86140b8cd..051606ab17 100644 --- a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Exchange.java +++ b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Exchange.java @@ -137,14 +137,14 @@ public class Exchange extends QmfAgentData // DELETE_ON_SESSION_END, DELETE_ON_NO_OUTBOUND_LINKS, DELETE_ON_NO_LINKS, IN_USE // We map these to a boolean value to be consistent with the C++ Broker QMF value. // TODO The C++ and Java Brokers should really return consistent information. - LifetimePolicy lifetimePolicy = (LifetimePolicy)_exchange.getAttribute("lifetimePolicy"); + LifetimePolicy lifetimePolicy = _exchange.getLifetimePolicy(); boolean autoDelete = (lifetimePolicy != LifetimePolicy.PERMANENT) ? true : false; // TODO vhostRef - currently just use its name to try and get things working with standard command line tools. setValue("name", _name); - setValue("type", _exchange.getAttribute("type")); - setValue("durable", _exchange.getAttribute("durable")); + setValue("type", _exchange.getType()); + setValue("durable", _exchange.isDurable()); setValue("autoDelete", autoDelete); // TODO altExchange and arguments properties. diff --git a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Queue.java b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Queue.java index 5fef3216da..911b58b758 100644 --- a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Queue.java +++ b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Queue.java @@ -144,19 +144,19 @@ public class Queue extends QmfAgentData // DELETE_ON_SESSION_END, DELETE_ON_NO_OUTBOUND_LINKS, DELETE_ON_NO_LINKS, IN_USE // We map these to a boolean value to be consistent with the C++ Broker QMF value. // TODO The C++ and Java Brokers should really return consistent information. - LifetimePolicy lifetimePolicy = (LifetimePolicy)_queue.getAttribute("lifetimePolicy"); + LifetimePolicy lifetimePolicy = _queue.getLifetimePolicy(); boolean autoDelete = (lifetimePolicy != LifetimePolicy.PERMANENT) ? true : false; // In the Java Broker exclusivity may be NONE, SESSION, CONNECTION, CONTAINER, PRINCIPAL, LINK // We map these to a boolean value to be consistent with the C++ Broker QMF value. // TODO The C++ and Java Brokers should really return consistent information. - ExclusivityPolicy exclusivityPolicy = (ExclusivityPolicy)_queue.getAttribute("exclusive"); + ExclusivityPolicy exclusivityPolicy = _queue.getExclusive(); boolean exclusive = (exclusivityPolicy != ExclusivityPolicy.NONE) ? true : false; // TODO vhostRef - currently just use its name to try and get things working with standard command line tools. setValue("name", name); - setValue("durable", _queue.getAttribute("durable")); + setValue("durable", _queue.isDurable()); setValue("autoDelete", autoDelete); setValue("exclusive", exclusive); @@ -247,7 +247,7 @@ public class Queue extends QmfAgentData // too late to populate the "altEx" property of the queueDeclareEvent. if (_alternateExchange == null) { - Exchange altEx = (Exchange)_queue.getAttribute("alternateExchange"); + Exchange altEx = _queue.getAlternateExchange(); if (altEx != null) { _alternateExchangeName = _vhostName + altEx.getName(); diff --git a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Session.java b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Session.java index 7c4f121503..ea7bece7c0 100644 --- a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Session.java +++ b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Session.java @@ -89,7 +89,7 @@ public class Session extends QmfAgentData super(getSchema()); _session = session; - setValue("name", session.getAttribute("id")); // Use ID to be consistent with C++ Broker. + setValue("name", session.getId()); // Use ID to be consistent with C++ Broker. setValue("channelId", session.getName()); // The Java Broker name uses the channelId. setRefValue("connectionRef", connectionRef); } diff --git a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Subscription.java b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Subscription.java index 6e12949c31..bdfe6cca37 100644 --- a/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Subscription.java +++ b/tools/src/java/qpid-broker-plugins-management-qmf2/src/main/java/org/apache/qpid/server/qmf2/agentdata/Subscription.java @@ -153,7 +153,7 @@ public class Subscription extends QmfAgentData // In the Java Broker exclusivity may be NONE, SESSION, CONNECTION, CONTAINER, PRINCIPAL, LINK // We map these to a boolean value to be consistent with the C++ Broker QMF values. // TODO The C++ and Java Brokers should really return consistent information. - ExclusivityPolicy exclusivityPolicy = (ExclusivityPolicy)queue.getAttribute("exclusive"); + ExclusivityPolicy exclusivityPolicy = queue.getExclusive(); _exclusive = (exclusivityPolicy != ExclusivityPolicy.NONE) ? true : false; } |