activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r475794 - /incubator/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
Date Thu, 16 Nov 2006 16:17:22 GMT
Author: jstrachan
Date: Thu Nov 16 08:17:20 2006
New Revision: 475794

URL: http://svn.apache.org/viewvc?view=rev&rev=475794
Log:
tidied up help when ran in interactive mode or via the Command Agent

Modified:
    incubator/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java

Modified: incubator/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java?view=diff&rev=475794&r1=475793&r2=475794
==============================================================================
--- incubator/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
(original)
+++ incubator/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
Thu Nov 16 08:17:20 2006
@@ -29,6 +29,7 @@
 public class ShellCommand extends AbstractCommand {
 
     private boolean interactive;
+    private String[] helpFile;
 
 
     public ShellCommand() {
@@ -37,6 +38,25 @@
 
     public ShellCommand(boolean interactive) {
         this.interactive = interactive;
+        this.helpFile = new String[]{
+                (interactive ? "Usage: [task] [task-options] [task data]" : "Usage: Main
[--extdir <dir>] [task] [task-options] [task data]"),
+                "",
+                "Tasks (default task is start):",
+                "    start           - Creates and starts a broker using a configuration
file, or a broker URI.",
+                "    stop            - Stops a running broker specified by the broker name.",
+                "    list            - Lists all available brokers in the specified JMX context.",
+                "    query           - Display selected broker component's attributes and
statistics.",
+                "    browse          - Display selected messages in a specified destination.",
+                "",
+                "Task Options (Options specific to each task):",
+                "    --extdir <dir>  - Add the jar files in the directory to the classpath.",
+                "    --version       - Display the version information.",
+                "    -h,-?,--help    - Display this help information. To display task specific
help, use " + (interactive ? "" : "Main ") + "[task] -h,-?,--help",
+                "",
+                "Task Data:",
+                "    - Information needed by each specific task.",
+                ""
+        };
     }
 
     /**
@@ -112,24 +132,4 @@
     protected void printHelp() {
         GlobalWriter.printHelp(helpFile);
     }
-
-    protected String[] helpFile = new String[] {
-        "Usage: Main [--extdir <dir>] [task] [task-options] [task data]",
-        "",
-        "Tasks (default task is start):",
-        "    start           - Creates and starts a broker using a configuration file, or
a broker URI.",
-        "    stop            - Stops a running broker specified by the broker name.",
-        "    list            - Lists all available brokers in the specified JMX context.",
-        "    query           - Display selected broker component's attributes and statistics.",
-        "    browse          - Display selected messages in a specified destination.",
-        "",
-        "Task Options (Options specific to each task):",
-        "    --extdir <dir>  - Add the jar files in the directory to the classpath.",
-        "    --version       - Display the version information.",
-        "    -h,-?,--help    - Display this help information. To display task specific help,
use Main [task] -h,-?,--help",
-        "",
-        "Task Data:",
-        "    - Information needed by each specific task.",
-        ""
-    };
 }



Mime
View raw message