Repository: activemq-artemis Updated Branches: refs/heads/master 79647167f -> ef4efe7d3
couple of small changes to JMX mbeans - no jira Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/6af85a2c Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/6af85a2c Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/6af85a2c Branch: refs/heads/master Commit: 6af85a2cc456feb4abe39d3b02a2345770738426 Parents: 83e83e7 Author: Andy Taylor <andy.tayl...@gmail.com> Authored: Mon Jan 9 13:32:01 2017 +0000 Committer: Andy Taylor <andy.tayl...@gmail.com> Committed: Mon Jan 9 13:40:14 2017 +0000 ---------------------------------------------------------------------- .../artemis/api/core/management/AddressControl.java | 6 ++++++ .../artemis/api/core/management/QueueControl.java | 4 ++-- .../core/management/impl/AddressControlImpl.java | 16 ++++++++++++++++ .../core/management/impl/QueueControlImpl.java | 6 +++--- 4 files changed, 27 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6af85a2c/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java index c48ef88..92b0082 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressControl.java @@ -39,6 +39,12 @@ public interface AddressControl { @Attribute(desc = "Get the delivery modes enabled on this address") Set<RoutingType> getDeliveryModes(); + /* + * Whether multicast routing is enabled for this address + * */ + @Attribute(desc = "Get the delivery modes enabled on this address as JSON") + String getDeliveryModesAsJSON() throws Exception; + /** * Returns the roles (name and permissions) associated with this address. */ http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6af85a2c/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 dbd3ea5..25c154f 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 @@ -357,7 +357,7 @@ public interface QueueControl { */ @Operation(desc = "Sends a TextMessage to a password-protected destination.", impact = MBeanOperationInfo.ACTION) String sendMessage(@Parameter(name = "headers", desc = "The headers to add to the message") Map<String, String> headers, - @Parameter(name = "headers", desc = "A type for the message") final int type, + @Parameter(name = "type", desc = "A type for the message") final int type, @Parameter(name = "body", desc = "The body (byte[]) of the message encoded as a string using Base64") String body, @Parameter(name = "durable", desc = "Whether the message is durable") boolean durable, @Parameter(name = "user", desc = "The user to authenticate with") String user, @@ -448,7 +448,7 @@ public interface QueueControl { * Resets the MessagesAdded property */ @Operation(desc = "Browse Messages", impact = MBeanOperationInfo.ACTION) - CompositeData[] browse(String filter) throws Exception; + CompositeData[] browse(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception; /** * Resets the MessagesAdded property http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6af85a2c/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java index 06c21a1..4547f9e 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java @@ -102,6 +102,22 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } @Override + public String getDeliveryModesAsJSON() throws Exception { + clearIO(); + try { + JsonArrayBuilder json = JsonLoader.createArrayBuilder(); + Set<RoutingType> routingTypes = getDeliveryModes(); + + for (RoutingType routingType : routingTypes) { + json.add(routingType.toString()); + } + return json.build().toString(); + } finally { + blockOnIO(); + } + } + + @Override public String[] getQueueNames() throws Exception { clearIO(); try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6af85a2c/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 3bbbac8..c303b1f 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 @@ -915,7 +915,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { return browse(null); } @Override - public CompositeData[] browse(String filterStr) throws Exception { + public CompositeData[] browse(String filter) throws Exception { checkStarted(); clearIO(); @@ -923,12 +923,12 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { int pageSize = addressSettingsRepository.getMatch(queue.getName().toString()).getManagementBrowsePageSize(); int currentPageSize = 0; ArrayList<CompositeData> c = new ArrayList<>(); - Filter filter = FilterImpl.createFilter(filterStr); + Filter thefilter = FilterImpl.createFilter(filter); queue.flushExecutor(); try (LinkedListIterator<MessageReference> iterator = queue.browserIterator()) { while (iterator.hasNext() && currentPageSize++ < pageSize) { MessageReference ref = iterator.next(); - if (filter == null || filter.match(ref.getMessage())) { + if (thefilter == null || thefilter.match(ref.getMessage())) { c.add(OpenTypeSupport.convert(ref)); }