activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject git commit: AMQ-4760: Added dstat command to activemq karaf commands.
Date Tue, 01 Oct 2013 14:23:53 GMT
Updated Branches:
  refs/heads/trunk a80a1857d -> ee8b51b27


AMQ-4760: Added dstat command to activemq karaf commands.


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

Branch: refs/heads/trunk
Commit: ee8b51b27bcb81544d853c3ff8b67a6dc79108f0
Parents: a80a185
Author: Claus Ibsen <claus.ibsen@gmail.com>
Authored: Tue Oct 1 16:19:19 2013 +0200
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Tue Oct 1 16:23:48 2013 +0200

----------------------------------------------------------------------
 .../activemq/console/command/DstatCommand.java  |  18 +-
 .../OSGI-INF/blueprint/activemq-karaf.xml       | 286 ++++++++++---------
 2 files changed, 165 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/ee8b51b2/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
----------------------------------------------------------------------
diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
b/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
index c7b5f10..a0ccc36 100644
--- a/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
+++ b/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
@@ -81,13 +81,13 @@ public class DstatCommand extends AbstractJmxCommand {
         }
     }
 
-    private void displayAllDestinations() throws IOException, Exception {
+    private void displayAllDestinations() throws Exception {
 
         String query = JmxMBeansUtil.createQueryString(queryString, "*");
         List<?> queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), query);
 
-        final String header = "%20s  %10s  %10s  %10s  %10s";
-        final String tableRow = "%20s  %10d  %10d  %10d  %10d";
+        final String header = "%-60s  %10s  %10s  %10s  %10s";
+        final String tableRow = "%-60s  %10d  %10d  %10d  %10d";
 
         context.print(String.format(Locale.US, header, "Name", "Pending", "Consumers", "Enqueued",
"Dequeued"));
 
@@ -106,13 +106,13 @@ public class DstatCommand extends AbstractJmxCommand {
         }
     }
 
-    private void displayQueueStats() throws IOException, Exception {
+    private void displayQueueStats() throws Exception {
 
         String query = JmxMBeansUtil.createQueryString(queryString, "Queue");
         List<?> queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), query);
 
-        final String header = "%20s  %10s  %10s  %10s  %10s";
-        final String tableRow = "%20s  %10d  %10d  %10d  %10d";
+        final String header = "%-60s  %10s  %10s  %10s  %10s";
+        final String tableRow = "%-60s  %10d  %10d  %10d  %10d";
 
         context.print(String.format(Locale.US, header, "Name", "Pending", "Consumers", "Enqueued",
"Dequeued"));
 
@@ -131,13 +131,13 @@ public class DstatCommand extends AbstractJmxCommand {
         }
     }
 
-    private void displayTopicStats() throws IOException, Exception {
+    private void displayTopicStats() throws Exception {
 
         String query = JmxMBeansUtil.createQueryString(queryString, "Topic");
         List<?> topicsList = JmxMBeansUtil.queryMBeans(createJmxConnection(), query);
 
-        final String header = "%20s  %10s  %10s  %10s";
-        final String tableRow = "%20s  %10d  %10d  %10d";
+        final String header = "%-60s  %10s  %10s  %10s";
+        final String tableRow = "%-60s  %10d  %10d  %10d";
 
         context.print(String.format(Locale.US, header, "Name", "Consumers", "Enqueued", "Dequeued"));
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/ee8b51b2/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
----------------------------------------------------------------------
diff --git a/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml b/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
index 436f45b..1a5d561 100644
--- a/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
+++ b/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
@@ -19,135 +19,161 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:shell="http://karaf.apache.org/xmlns/shell/v1.0.0">
-    
-    <!-- ActiveMQ List Command -->
-    <bean id="listcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="listaction"/>
-    </bean>
-
-    <service ref="listcommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="list"/>
-        </service-properties>
-    </service>
-
-    <bean id="listaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.ListCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Query Command -->
-    <bean id="querycommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="queryaction"/>
-    </bean>
-
-    <service ref="querycommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="query"/>
-        </service-properties>
-    </service>
-
-    <bean id="queryaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.QueryCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Browse Command -->
-    <bean id="browsecommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="browseaction"/>
-    </bean>
-
-    <service ref="browsecommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="browse"/>
-        </service-properties>
-    </service>
-
-    <bean id="browseaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.AmqBrowseCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Bstat Command -->
-    <bean id="bstatcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="bstataction"/>
-    </bean>
-
-    <service ref="bstatcommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="bstat"/>
-        </service-properties>
-    </service>
-
-    <bean id="bstataction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.BstatCommand"/>
-        </property>
-    </bean>
-
-    <!-- ActiveMQ Purge Command -->
-    <bean id="purgecommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
-      <property name="blueprintContainer" ref="blueprintContainer"/>
-      <property name="blueprintConverter" ref="blueprintConverter"/>
-      <property name="actionId" value="purgeaction"/>
-    </bean>
-
-    <service ref="purgecommand" activation="lazy" >
-        <interfaces>
-            <value>org.apache.felix.service.command.Function</value>
-            <value>org.apache.karaf.shell.console.CompletableFunction</value>
-        </interfaces>
-        <service-properties>
-            <entry key="osgi.command.scope" value="activemq"/>
-            <entry key="osgi.command.function" value="purge"/>
-        </service-properties>
-    </service>
-
-    <bean id="purgeaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
-          activation="lazy"
-          scope="prototype">
-        <property name="command">
-            <bean class="org.apache.activemq.console.command.PurgeCommand"/>
-        </property>
-    </bean>
+
+  <!-- ActiveMQ List Command -->
+  <bean id="listcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+    <property name="blueprintContainer" ref="blueprintContainer"/>
+    <property name="blueprintConverter" ref="blueprintConverter"/>
+    <property name="actionId" value="listaction"/>
+  </bean>
+
+  <service ref="listcommand" activation="lazy">
+    <interfaces>
+      <value>org.apache.felix.service.command.Function</value>
+      <value>org.apache.karaf.shell.console.CompletableFunction</value>
+    </interfaces>
+    <service-properties>
+      <entry key="osgi.command.scope" value="activemq"/>
+      <entry key="osgi.command.function" value="list"/>
+    </service-properties>
+  </service>
+
+  <bean id="listaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+        activation="lazy"
+        scope="prototype">
+    <property name="command">
+      <bean class="org.apache.activemq.console.command.ListCommand"/>
+    </property>
+  </bean>
+
+  <!-- ActiveMQ Query Command -->
+  <bean id="querycommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+    <property name="blueprintContainer" ref="blueprintContainer"/>
+    <property name="blueprintConverter" ref="blueprintConverter"/>
+    <property name="actionId" value="queryaction"/>
+  </bean>
+
+  <service ref="querycommand" activation="lazy">
+    <interfaces>
+      <value>org.apache.felix.service.command.Function</value>
+      <value>org.apache.karaf.shell.console.CompletableFunction</value>
+    </interfaces>
+    <service-properties>
+      <entry key="osgi.command.scope" value="activemq"/>
+      <entry key="osgi.command.function" value="query"/>
+    </service-properties>
+  </service>
+
+  <bean id="queryaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+        activation="lazy"
+        scope="prototype">
+    <property name="command">
+      <bean class="org.apache.activemq.console.command.QueryCommand"/>
+    </property>
+  </bean>
+
+  <!-- ActiveMQ Browse Command -->
+  <bean id="browsecommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+    <property name="blueprintContainer" ref="blueprintContainer"/>
+    <property name="blueprintConverter" ref="blueprintConverter"/>
+    <property name="actionId" value="browseaction"/>
+  </bean>
+
+  <service ref="browsecommand" activation="lazy">
+    <interfaces>
+      <value>org.apache.felix.service.command.Function</value>
+      <value>org.apache.karaf.shell.console.CompletableFunction</value>
+    </interfaces>
+    <service-properties>
+      <entry key="osgi.command.scope" value="activemq"/>
+      <entry key="osgi.command.function" value="browse"/>
+    </service-properties>
+  </service>
+
+  <bean id="browseaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+        activation="lazy"
+        scope="prototype">
+    <property name="command">
+      <bean class="org.apache.activemq.console.command.AmqBrowseCommand"/>
+    </property>
+  </bean>
+
+  <!-- ActiveMQ Bstat Command -->
+  <bean id="bstatcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+    <property name="blueprintContainer" ref="blueprintContainer"/>
+    <property name="blueprintConverter" ref="blueprintConverter"/>
+    <property name="actionId" value="bstataction"/>
+  </bean>
+
+  <service ref="bstatcommand" activation="lazy">
+    <interfaces>
+      <value>org.apache.felix.service.command.Function</value>
+      <value>org.apache.karaf.shell.console.CompletableFunction</value>
+    </interfaces>
+    <service-properties>
+      <entry key="osgi.command.scope" value="activemq"/>
+      <entry key="osgi.command.function" value="bstat"/>
+    </service-properties>
+  </service>
+
+  <bean id="bstataction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+        activation="lazy"
+        scope="prototype">
+    <property name="command">
+      <bean class="org.apache.activemq.console.command.BstatCommand"/>
+    </property>
+  </bean>
+
+  <!-- ActiveMQ Purge Command -->
+  <bean id="purgecommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+    <property name="blueprintContainer" ref="blueprintContainer"/>
+    <property name="blueprintConverter" ref="blueprintConverter"/>
+    <property name="actionId" value="purgeaction"/>
+  </bean>
+
+  <service ref="purgecommand" activation="lazy">
+    <interfaces>
+      <value>org.apache.felix.service.command.Function</value>
+      <value>org.apache.karaf.shell.console.CompletableFunction</value>
+    </interfaces>
+    <service-properties>
+      <entry key="osgi.command.scope" value="activemq"/>
+      <entry key="osgi.command.function" value="purge"/>
+    </service-properties>
+  </service>
+
+  <bean id="purgeaction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+        activation="lazy"
+        scope="prototype">
+    <property name="command">
+      <bean class="org.apache.activemq.console.command.PurgeCommand"/>
+    </property>
+  </bean>
+
+  <!-- ActiveMQ Dstat Command -->
+  <bean id="dstatcommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+    <property name="blueprintContainer" ref="blueprintContainer"/>
+    <property name="blueprintConverter" ref="blueprintConverter"/>
+    <property name="actionId" value="dstataction"/>
+  </bean>
+
+  <service ref="dstatcommand" activation="lazy">
+    <interfaces>
+      <value>org.apache.felix.service.command.Function</value>
+      <value>org.apache.karaf.shell.console.CompletableFunction</value>
+    </interfaces>
+    <service-properties>
+      <entry key="osgi.command.scope" value="activemq"/>
+      <entry key="osgi.command.function" value="dstat"/>
+    </service-properties>
+  </service>
+
+  <bean id="dstataction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+        activation="lazy"
+        scope="prototype">
+    <property name="command">
+      <bean class="org.apache.activemq.console.command.DstatCommand"/>
+    </property>
+  </bean>
 
 </blueprint>


Mime
View raw message