|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.grid.jgdi.util.shell.AbstractCommand
public abstract class AbstractCommand
Constructor Summary | |
---|---|
AbstractCommand()
|
Method Summary | |
---|---|
int |
getExitCode()
Gets the commands exit code |
Shell |
getShell()
|
java.lang.String |
getUsage()
Gets the command usage |
void |
init(Shell shell)
Init command, set all needed arrtibutes from shell |
void |
printAnswers(java.util.List<JGDIAnswer> answers)
Prints the JGDI answer list to specified PrintWriter. |
abstract void |
run(java.lang.String[] args)
Run the command |
protected void |
setExitCode(int newCode)
Sets the commands exit code to newCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCommand()
Method Detail |
---|
public java.lang.String getUsage()
public abstract void run(java.lang.String[] args) throws java.lang.Exception
args
-
java.lang.Exception
public void init(Shell shell) throws java.lang.Exception
shell
-
java.lang.Exception
public Shell getShell()
public void printAnswers(java.util.List<JGDIAnswer> answers)
Prints the JGDI answer list to specified PrintWriter.
Helper method for JGDI methods *withAnswer
answers
- a JGDI answer listpublic int getExitCode()
Gets the commands exit code
protected void setExitCode(int newCode)
Sets the commands exit code to newCode
newCode
- new exitCode of this command
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |