com.dtolabs.rundeck.core.cli
Interface CLITool

All Superinterfaces:
BaseLogger, CLIToolLogger
All Known Implementing Classes:
BaseTool, ExecTool, JobsTool, ProjectTool, QueueTool, RunTool

public interface CLITool
extends CLIToolLogger

Classes that implement this interface provide a shell tool with a command line interface.


Method Summary
 void exit(int exitcode)
          Calls the exit method
 void help()
          Writes help message to implementation specific output channel.
 org.apache.commons.cli.CommandLine parseArgs(java.lang.String[] args)
          Reads the argument vector and constructs a CommandLine object containing params
 void run(java.lang.String[] args)
          The run method carries out the lifecycle of the tool, parsing args, handling exceptions, and exiting with a suitable exit code.
 
Methods inherited from interface com.dtolabs.rundeck.core.execution.BaseLogger
debug, error, log, verbose, warn
 

Method Detail

parseArgs

org.apache.commons.cli.CommandLine parseArgs(java.lang.String[] args)
                                             throws CLIToolOptionsException
Reads the argument vector and constructs a CommandLine object containing params

Parameters:
args - the cli arg vector
Returns:
a new instance of CommandLine
Throws:
CLIToolOptionsException

run

void run(java.lang.String[] args)
         throws CLIToolException
The run method carries out the lifecycle of the tool, parsing args, handling exceptions, and exiting with a suitable exit code.

Parameters:
args - the cli arg vector
Throws:
CLIToolException

exit

void exit(int exitcode)
Calls the exit method

Parameters:
exitcode - return code to exit with

help

void help()
Writes help message to implementation specific output channel.