activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r368942 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker: ./ console/
Date Sat, 14 Jan 2006 01:08:17 GMT
Author: chirino
Date: Fri Jan 13 17:08:12 2006
New Revision: 368942

URL: http://svn.apache.org/viewcvs?rev=368942&view=rev
Log:
Renamed the *Task stuff to *Command, the Main method now just only calls the DefaultCommand,
which delegates to the other commands.

Added:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Command.java
      - copied, changed from r368596, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Task.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartCommand.java
      - copied, changed from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartTask.java
Removed:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartTask.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Task.java
Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Main.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Main.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Main.java?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Main.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/Main.java
Fri Jan 13 17:08:12 2006
@@ -17,6 +17,8 @@
 package org.apache.activemq.broker;
 
 import java.io.File;
+import java.io.InputStream;
+import java.io.PrintStream;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.JarURLConnection;
@@ -25,10 +27,10 @@
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
-import java.util.List;
-import java.util.LinkedList;
 import java.util.Arrays;
 import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
 
 /**
  * Main class that can bootstrap an ActiveMQ broker console. Handles command line
@@ -37,19 +39,9 @@
  * @version $Revision$
  */
 public class Main {
-    public static final int TASK_DEFAULT = 0;
-    public static final int TASK_START   = 1;
-    public static final int TASK_STOP    = 2;
-    public static final int TASK_LIST    = 3;
-    public static final int TASK_QUERY   = 4;
-
-    public static final String TASK_DEFAULT_CLASS  = "org.apache.activemq.broker.console.DefaultTask";
-    public static final String TASK_START_CLASS    = "org.apache.activemq.broker.console.StartTask";
-    public static final String TASK_SHUTDOWN_CLASS = "org.apache.activemq.broker.console.ShutdownTask";
-    public static final String TASK_LIST_CLASS     = "org.apache.activemq.broker.console.ListTask";
-    public static final String TASK_QUERY_CLASS    = "org.apache.activemq.broker.console.QueryTask";
 
-    private int           taskType;
+    public static final String TASK_DEFAULT_CLASS  = "org.apache.activemq.broker.console.DefaultCommand";
+
     private File          activeMQHome;
     private ClassLoader   classLoader;
     private List          extensions = new ArrayList(5);
@@ -62,9 +54,6 @@
         // Convert arguments to collection for easier management
         List tokens =  new LinkedList(Arrays.asList(args));
 
-        // First token should be task type (start|stop|list|query)
-        app.setTaskType(app.parseTask(tokens));
-
         // Parse for extension directory option
         app.parseExtensions(tokens);
 
@@ -75,45 +64,13 @@
             app.addExtensionDirectory(new File(new File(app.getActiveMQHome(), "lib"), "optional"));
         }
 
-        // Succeeding tokens should be the task data
         try {
-            switch (app.getTaskType()) {
-                case TASK_START:   app.runTaskClass(TASK_START_CLASS, tokens);    break;
-                case TASK_STOP:    app.runTaskClass(TASK_SHUTDOWN_CLASS, tokens); break;
-                case TASK_LIST:    app.runTaskClass(TASK_LIST_CLASS, tokens);     break;
-                case TASK_QUERY:   app.runTaskClass(TASK_QUERY_CLASS, tokens);    break;
-                case TASK_DEFAULT: app.runTaskClass(TASK_DEFAULT_CLASS, tokens);  break;
-                default:
-                    System.out.println("Encountered unknown task type: " + app.getTaskType());
-            }
+            app.runTaskClass(tokens);
         } catch (Throwable e) {
             System.out.println("Failed to execute main task. Reason: " + e);
         }
     }
 
-    public int parseTask(List tokens) {
-        if (tokens.isEmpty()) {
-            // If no task, run the default task
-            return TASK_DEFAULT;
-        }
-
-        // Process task token
-        String taskToken = (String)tokens.remove(0);
-        if (taskToken.equals("start")) {
-            return TASK_START;
-        } else if (taskToken.equals("stop")) {
-            return TASK_STOP;
-        } else if (taskToken.equals("list")) {
-            return TASK_LIST;
-        } else if (taskToken.equals("query")) {
-            return TASK_QUERY;
-        } else {
-            // If not valid task, push back to list
-            tokens.add(0, taskToken);
-            return TASK_DEFAULT;
-        }
-    }
-
     public void parseExtensions(List tokens) {
         if (tokens.isEmpty()) {
             return;
@@ -155,16 +112,17 @@
 
     }
 
-    public void runTaskClass(String taskClass, List tokens) throws Throwable {
+    public void runTaskClass(List tokens) throws Throwable {
         System.out.println("ACTIVEMQ_HOME: "+ getActiveMQHome());
 
         ClassLoader cl = getClassLoader();
 
         // Use reflection to run the task.
         try {
-            Class task = cl.loadClass(taskClass);
-            Method runTask = task.getMethod("runTask", new Class[] { List.class });
-            runTask.invoke(task.newInstance(), new Object[] { tokens });
+            String[] args = (String[]) tokens.toArray(new String[tokens.size()]);
+            Class task = cl.loadClass(TASK_DEFAULT_CLASS);
+            Method runTask = task.getMethod("main", new Class[] { String[].class, InputStream.class,
PrintStream.class });
+            runTask.invoke(task.newInstance(), new Object[] { args, System.in, System.out
});
         } catch (InvocationTargetException e) {
             throw e.getCause();
         } catch (Throwable e) {
@@ -218,14 +176,6 @@
             Thread.currentThread().setContextClassLoader(classLoader);
         }
         return classLoader;
-    }
-
-    public int getTaskType() {
-        return taskType;
-    }
-
-    public void setTaskType(int taskType) {
-        this.taskType = taskType;
     }
 
     public void setActiveMQHome(File activeMQHome) {

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractCommand.java
Fri Jan 13 17:08:12 2006
@@ -18,21 +18,35 @@
 
 import org.apache.activemq.ActiveMQConnectionMetaData;
 
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
-public abstract class AbstractTask implements Task {
+public abstract class AbstractCommand implements Command {
     private boolean isPrintHelp    = false;
     private boolean isPrintVersion = false;
+    protected PrintStream out;
 
-    public void runTask(List tokens) throws Exception {
-        parseOptions(tokens);
-
-        if (isPrintHelp) {
-            printHelp();
-        } else if (isPrintVersion) {
-            printVersion();
-        } else {
-            startTask(tokens);
+    public int main(String[] args, InputStream in, PrintStream out) {
+        this.out = out;
+        try {
+            List tokens = new ArrayList(Arrays.asList(args));
+            parseOptions(tokens);
+
+            if (isPrintHelp) {
+                printHelp();
+            } else if (isPrintVersion) {
+                printVersion();
+            } else {
+                execute(tokens);
+            }
+            return 0;
+        } catch (Exception e) {
+            out.println("Failed to execute main task. Reason: " + e);
+            e.printStackTrace(out);
+            return -1;
         }
     }
 
@@ -77,23 +91,23 @@
 
         // Token is unrecognized
         else {
-            System.out.println("Ignoring unrecognized option: " + token);
+            out.println("Ignoring unrecognized option: " + token);
         }
     }
 
     protected void printVersion() {
-        System.out.println();
-        System.out.println("ActiveMQ " + ActiveMQConnectionMetaData.PROVIDER_VERSION);
-        System.out.println("For help or more information please see: http://www.logicblaze.com");
-        System.out.println();
+        out.println();
+        out.println("ActiveMQ " + ActiveMQConnectionMetaData.PROVIDER_VERSION);
+        out.println("For help or more information please see: http://www.logicblaze.com");
+        out.println();
     }
 
     protected void printError(String message) {
         isPrintHelp = true;
-        System.out.println(message);
-        System.out.println();
+        out.println(message);
+        out.println();
     }
 
-    abstract protected void startTask(List tokens) throws Exception;
+    abstract protected void execute(List tokens) throws Exception;
     abstract protected void printHelp();
 }

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/AbstractJmxCommand.java
Fri Jan 13 17:08:12 2006
@@ -23,7 +23,7 @@
 import java.net.MalformedURLException;
 import java.io.IOException;
 
-public abstract class AbstractJmxTask extends AbstractTask {
+public abstract class AbstractJmxCommand extends AbstractCommand {
     public static final String DEFAULT_JMX_URL    = "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi";
 
     private JMXServiceURL jmxServiceUrl;

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Command.java
(from r368596, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Task.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Command.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Command.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Task.java&r1=368596&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Task.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/Command.java
Fri Jan 13 17:08:12 2006
@@ -17,8 +17,9 @@
 
 package org.apache.activemq.broker.console;
 
-import java.util.List;
+import java.io.InputStream;
+import java.io.PrintStream;
 
-public interface Task {
-    public void runTask(List tokens) throws Exception;
+public interface Command {
+    public int main(String[] args, InputStream in, PrintStream out);
 }

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/DefaultCommand.java
Fri Jan 13 17:08:12 2006
@@ -16,25 +16,51 @@
  */
 package org.apache.activemq.broker.console;
 
-public class DefaultTask extends StartTask {
+import java.util.List;
+
+public class DefaultCommand extends AbstractCommand {
+
+    protected void execute(List tokens) {
+        
+        // Process task token
+        if( tokens.size() > 0 ) {
+            String taskToken = (String)tokens.remove(0);
+            if (taskToken.equals("start")) {
+                new StartCommand().execute(tokens);
+            } else if (taskToken.equals("stop")) {
+                new ShutdownCommand().execute(tokens);
+            } else if (taskToken.equals("list")) {
+                new ListCommand().execute(tokens);
+            } else if (taskToken.equals("query")) {
+                new QueryCommand().execute(tokens);
+            } else {
+                // If not valid task, push back to list
+                tokens.add(0, taskToken);
+                new StartCommand().execute(tokens);
+            }
+        } else {
+            new StartCommand().execute(tokens);
+        }
+        
+    }
 
     protected void printHelp() {
-        System.out.println("Usage: Main [task] [--extdir <dir>] [task-options] [task
data]");
-        System.out.println("");
-        System.out.println("Tasks (default task is start):");
-        System.out.println("    start           - Creates and starts a broker using a configuration
file, or a broker URI.");
-        System.out.println("    stop            - Stops a running broker specified by the
broker name.");
-        System.out.println("    list            - Lists all available brokers in the specified
JMX context.");
-        System.out.println("    query           - Display selected broker component's attributes
and statistics.");
-        System.out.println("    --extdir <dir>  - Add the jar files in the directory
to the classpath.");
-        System.out.println("    --version       - Display the version information.");
-        System.out.println("    -h,-?,--help    - Display this help information. To display
task specific help, use Main [task] -h,-?,--help");
-        System.out.println("");
-        System.out.println("Task Options:");
-        System.out.println("    - Properties specific to each task.");
-        System.out.println("");
-        System.out.println("Task Data:");
-        System.out.println("    - Information needed by each specific task.");
-        System.out.println("");
+        out.println("Usage: Main [task] [--extdir <dir>] [task-options] [task data]");
+        out.println("");
+        out.println("Tasks (default task is start):");
+        out.println("    start           - Creates and starts a broker using a configuration
file, or a broker URI.");
+        out.println("    stop            - Stops a running broker specified by the broker
name.");
+        out.println("    list            - Lists all available brokers in the specified JMX
context.");
+        out.println("    query           - Display selected broker component's attributes
and statistics.");
+        out.println("    --extdir <dir>  - Add the jar files in the directory to the
classpath.");
+        out.println("    --version       - Display the version information.");
+        out.println("    -h,-?,--help    - Display this help information. To display task
specific help, use Main [task] -h,-?,--help");
+        out.println("");
+        out.println("Task Options:");
+        out.println("    - Properties specific to each task.");
+        out.println("");
+        out.println("Task Data:");
+        out.println("    - Information needed by each specific task.");
+        out.println("");
     }
 }

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ListCommand.java
Fri Jan 13 17:08:12 2006
@@ -18,9 +18,9 @@
 
 import java.util.List;
 
-public class ListTask extends AbstractJmxTask {
+public class ListCommand extends AbstractJmxCommand {
 
-    protected void startTask(List tokens) {
+    protected void execute(List tokens) {
         try {
             AmqJmxSupport.printBrokerList(AmqJmxSupport.getAllBrokers(createJmxConnector().getMBeanServerConnection()));
             closeJmxConnector();

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/QueryCommand.java
Fri Jan 13 17:08:12 2006
@@ -27,7 +27,7 @@
 import java.util.Set;
 import java.util.Iterator;
 
-public class QueryTask extends AbstractJmxTask {
+public class QueryCommand extends AbstractJmxCommand {
     // Predefined type=identifier query
     private static final Properties PREDEFINED_OBJNAME_QUERY = new Properties();
 
@@ -44,7 +44,7 @@
     private final List querySubObjects = new ArrayList(10);
     private final List queryViews      = new ArrayList(10);
 
-    protected void startTask(List tokens) {
+    protected void execute(List tokens) {
         try {
             // Connect to jmx server
             JMXConnector jmxConnector = createJmxConnector();

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/ShutdownCommand.java
Fri Jan 13 17:08:12 2006
@@ -24,10 +24,10 @@
 import java.util.Iterator;
 import java.util.HashSet;
 
-public class ShutdownTask extends AbstractJmxTask {
+public class ShutdownCommand extends AbstractJmxCommand {
     private boolean isStopAllBrokers = false;
 
-    protected void startTask(List brokerNames) {
+    protected void execute(List brokerNames) {
         try {
             Set mbeans = new HashSet();
             MBeanServerConnection server = createJmxConnector().getMBeanServerConnection();

Copied: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartCommand.java
(from r368940, incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartTask.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartCommand.java?p2=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartCommand.java&p1=incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartTask.java&r1=368940&r2=368942&rev=368942&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartTask.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/console/StartCommand.java
Fri Jan 13 17:08:12 2006
@@ -26,7 +26,7 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 
-public class StartTask extends AbstractTask {
+public class StartCommand extends AbstractCommand {
 
     public static final String DEFAULT_CONFIG_URI   = "xbean:activemq.xml";
 
@@ -37,7 +37,7 @@
      * The default task to start a broker or a group of brokers
      * @param brokerURIs
      */
-    protected void startTask(List brokerURIs) {
+    protected void execute(List brokerURIs) {
         try {
             // If no config uri, use default setting
             if (brokerURIs.isEmpty()) {



Mime
View raw message