com.crankuptheamps.spark
Class SparkCommand

java.lang.Object
  extended by com.crankuptheamps.spark.SparkCommand
Direct Known Subclasses:
HelpCommand, PingCommand, PublishCommand, SOWAndSubscribeCommand, SOWCommand, SOWDeleteCommand, SubscribeCommand

public abstract class SparkCommand
extends Object


Field Summary
protected  LinkedList<String> examples
           
protected  LinkedList<String> extras
           
protected  String name
           
protected  TreeSet<String> optional
           
protected  TreeMap<String,CommandOption> options
           
protected  TreeSet<String> required
           
protected  TreeMap<String,String> synonyms
           
protected  String usage
           
 
Constructor Summary
SparkCommand(String name)
           
 
Method Summary
 void addExample(String example)
           
 void addExtra(String extra)
           
 void addOption(CommandOption command)
           
 void addSynonym(String synonym, String baseName)
           
protected  void badUsage(String message)
           
protected  Authenticator createAuthenticator(String uri)
           
protected  void dumpArgs()
           
 String getName()
           
 void help()
           
 void setUsage(String usage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

options

protected TreeMap<String,CommandOption> options

required

protected TreeSet<String> required

optional

protected TreeSet<String> optional

examples

protected LinkedList<String> examples

extras

protected LinkedList<String> extras

usage

protected String usage

synonyms

protected TreeMap<String,String> synonyms
Constructor Detail

SparkCommand

public SparkCommand(String name)
Method Detail

getName

public String getName()

addOption

public void addOption(CommandOption command)

addSynonym

public void addSynonym(String synonym,
                       String baseName)

addExample

public void addExample(String example)

addExtra

public void addExtra(String extra)

setUsage

public void setUsage(String usage)

badUsage

protected void badUsage(String message)

dumpArgs

protected void dumpArgs()

createAuthenticator

protected Authenticator createAuthenticator(String uri)
                                     throws AuthenticationException
Throws:
AuthenticationException

help

public void help()