Repository: activemq-artemis
Updated Branches:
  refs/heads/master 584335416 -> 3efeccfa0


ARTEMIS-1075 - Add Routing Type to QueueControl management API

https://issues.apache.org/jira/browse/ARTEMIS-1075


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

Branch: refs/heads/master
Commit: ec7e6d7ea76382ba8a405155bf1c71b28cc34f28
Parents: 5843354
Author: Andy Taylor <[email protected]>
Authored: Tue Mar 28 10:40:45 2017 +0100
Committer: Andy Taylor <[email protected]>
Committed: Tue Mar 28 10:40:52 2017 +0100

----------------------------------------------------------------------
 .../artemis/api/core/management/QueueControl.java      |  6 ++++++
 .../artemis/core/management/impl/QueueControlImpl.java | 13 +++++++++++++
 .../management/QueueControlUsingCoreTest.java          |  5 +++++
 3 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec7e6d7e/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
----------------------------------------------------------------------
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
index ac20798..11c98ad 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
@@ -57,6 +57,12 @@ public interface QueueControl {
    boolean isDurable();
 
    /**
+    * The routing type of this queue.
+    */
+   @Attribute(desc = "The routing type of this queue")
+   byte getRoutingType() throws Exception;
+
+   /**
     * Returns the filter associated with this queue.
     */
    @Attribute(desc = "filter associated with this queue")

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec7e6d7e/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java
index c5f2111..f965561 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java
@@ -176,6 +176,19 @@ public class QueueControlImpl extends AbstractControl 
implements QueueControl {
    }
 
    @Override
+   public byte getRoutingType() throws Exception {
+      checkStarted();
+
+      clearIO();
+      try {
+         return queue.getRoutingType().getType();
+      } finally {
+         blockOnIO();
+      }
+
+   }
+
+   @Override
    public boolean isTemporary() {
       checkStarted();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec7e6d7e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
index a389d65..e96b5cb 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
@@ -172,6 +172,11 @@ public class QueueControlUsingCoreTest extends 
QueueControlTest {
          }
 
          @Override
+         public byte getRoutingType() throws Exception {
+            return  (byte) proxy.retrieveAttributeValue("routingType");
+         }
+
+         @Override
          public boolean isTemporary() {
             return (Boolean) proxy.retrieveAttributeValue("temporary");
          }

Reply via email to