org.apache.whirr.command
Class Command

java.lang.Object
  extended by org.apache.whirr.command.Command
Direct Known Subclasses:
AbstractClusterCommand, HelpCommand, VersionCommand

public abstract class Command
extends Object

A CLI command.


Constructor Summary
Command(String name, String description)
           
 
Method Summary
 String getDescription()
           
 String getName()
           
abstract  void printUsage(PrintStream stream)
           
abstract  int run(InputStream in, PrintStream out, PrintStream err, List<String> args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command(String name,
               String description)
Method Detail

getName

public String getName()

getDescription

public String getDescription()

run

public abstract int run(InputStream in,
                        PrintStream out,
                        PrintStream err,
                        List<String> args)
                 throws Exception
Throws:
Exception

printUsage

public abstract void printUsage(PrintStream stream)
                         throws IOException
Throws:
IOException


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.