|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cloudbees.sdk.cli.ACommand
public abstract class ACommand
A CLI command.
This is the contract of CLI commands. All the abstract subtypes are merely convenient partial implementations.
A command in CloudBees SDK is usually invoked as a sub-command of the bees command. It takes arbitrary numbers of arguments, whose meanings are entirely up to command implmentations. A command interacts with stdin/stdout/stderr.
Commands are instantiated with Guice, so they receive dependency injections.
| Constructor Summary | |
|---|---|
ACommand()
|
|
| Method Summary | |
|---|---|
abstract void |
printHelp(List<String> args)
Print out the detailed help of this command. |
abstract int |
run(List<String> args)
Executes this command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ACommand()
| Method Detail |
|---|
public abstract int run(List<String> args)
throws Exception
args - Never empty, never null. The first argument is the command name itself,
followed by arguments
Exceptionpublic abstract void printHelp(List<String> args)
args - For backward compatibility, this method receives the full argument list
(where the first token is the command name for which the help is requested.)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||