| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.rolandkrueger.roklib.cli.AbstractCommandObject
info.rolandkrueger.roklib.cli.ConsoleCommandObject
public abstract class ConsoleCommandObject
Base class for all command objects that are used with the
 ConsoleThread. The command's concrete functionality is implemented by
 overriding the run() method. 
 ConsoleCommandObject contains
 three strings: the command's name that is used by the user on the console, a
 short description of the command that is used by the 'help' command
 to show a brief overview of the available commands, and a long description
 that can be used to describe the command's functioning in more depth.
| Field Summary | |
|---|---|
private  String | 
mLongDescription
 | 
protected  OutputStream | 
mOutputStream
 | 
private  String | 
mShortDescription
 | 
| Fields inherited from class info.rolandkrueger.roklib.cli.AbstractCommandObject | 
|---|
mName | 
| Constructor Summary | |
|---|---|
ConsoleCommandObject(String name,
                     String shortDescription,
                     String longDescription)
Constructs a new command with the specified name and descriptions.  | 
|
ConsoleCommandObject(String name,
                     String shortDescription,
                     String longDescription,
                     OutputStream output)
Constructs a new command with the specified name and descriptions.  | 
|
| Method Summary | |
|---|---|
 String | 
getLongDescription()
Returns the long description for this command object.  | 
 OutputStream | 
getOutputStream()
Returns the output stream for this command object.  | 
 String | 
getShortDescription()
Returns the short description for this command object.  | 
 void | 
setOutputStream(OutputStream stream)
Sets the output stream for a command object.  | 
| Methods inherited from class info.rolandkrueger.roklib.cli.AbstractCommandObject | 
|---|
getName, run | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private final String mShortDescription
private final String mLongDescription
protected OutputStream mOutputStream
| Constructor Detail | 
|---|
public ConsoleCommandObject(String name,
                            String shortDescription,
                            String longDescription)
name - The name of the command.shortDescription - A short description of the command.longDescription - A more detailed description of the command's functioning.
public ConsoleCommandObject(String name,
                            String shortDescription,
                            String longDescription,
                            OutputStream output)
name - The name of the command.shortDescription - A short description of the command.longDescription - A more detailed description of the command's functioning.output - An output stream that can be used to write the command's output
          to.| Method Detail | 
|---|
public OutputStream getOutputStream()
public void setOutputStream(OutputStream stream)
stream - the output stream for the command objectpublic String getShortDescription()
public String getLongDescription()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||