ARTEMIS-1075 - Add Routing Type to QueueControl management API

https://issues.apache.org/jira/browse/ARTEMIS-1075
This commit is contained in:
Andy Taylor 2017-03-28 10:40:45 +01:00
parent 5843354168
commit ec7e6d7ea7
3 changed files with 24 additions and 0 deletions

View File

@ -56,6 +56,12 @@ public interface QueueControl {
@Attribute(desc = "whether this queue is durable") @Attribute(desc = "whether this queue is durable")
boolean isDurable(); 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. * Returns the filter associated with this queue.
*/ */

View File

@ -175,6 +175,19 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
} }
} }
@Override
public byte getRoutingType() throws Exception {
checkStarted();
clearIO();
try {
return queue.getRoutingType().getType();
} finally {
blockOnIO();
}
}
@Override @Override
public boolean isTemporary() { public boolean isTemporary() {
checkStarted(); checkStarted();

View File

@ -171,6 +171,11 @@ public class QueueControlUsingCoreTest extends QueueControlTest {
return (Boolean) proxy.retrieveAttributeValue("durable"); return (Boolean) proxy.retrieveAttributeValue("durable");
} }
@Override
public byte getRoutingType() throws Exception {
return (byte) proxy.retrieveAttributeValue("routingType");
}
@Override @Override
public boolean isTemporary() { public boolean isTemporary() {
return (Boolean) proxy.retrieveAttributeValue("temporary"); return (Boolean) proxy.retrieveAttributeValue("temporary");