|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.cli.BaseTool
com.dtolabs.rundeck.core.cli.queue.QueueTool
public class QueueTool
QueueTool is ...
Nested Class Summary | |
---|---|
static class |
QueueTool.Actions
Enumeration of available actions |
Field Summary | |
---|---|
static java.lang.String |
ACTION_FOLLOW
kill action identifier |
static java.lang.String |
ACTION_KILL
kill action identifier |
static java.lang.String |
ACTION_LIST
list action identifier |
static org.apache.log4j.Logger |
log4j
log4j |
Constructor Summary | |
---|---|
QueueTool()
Create QueueTool with default Framework instances located by the system rdeck.base property. |
|
QueueTool(CLIToolLogger logger)
Create QueueTool specifying the logger |
|
QueueTool(Framework framework)
Create QueueTool specifying the framework |
|
QueueTool(Framework framework,
CLIToolLogger logger)
Create QueueTool with the framework. |
Method Summary | |
---|---|
void |
debug(java.lang.String message)
Logs debug message via implementation specific log facility |
void |
error(java.lang.String output)
Logs error message via implementation specific log facility |
static boolean |
followAction(java.lang.String execid,
boolean restart,
ConsoleExecutionFollowReceiver.Mode mode,
Framework framework,
java.io.PrintStream out,
BaseLogger logger)
Perform the Follow action for an Execution |
QueueTool.Actions |
getAction()
Get action |
java.lang.String |
getExecid()
Get jobId for use with Kill action |
java.lang.String |
getHelpString()
Return the help string used when -h option is specified. |
protected void |
go()
Call the action |
boolean |
isArgVerbose()
Return verbose |
protected boolean |
isUseHelpOption()
Return true if the -h/--help option should be added to the options automatically. |
void |
log(java.lang.String output)
Logs message via implementation specific log facility |
static void |
main(java.lang.String[] args)
Creates an instance and executes BaseTool.run(String[]) . |
org.apache.commons.cli.CommandLine |
parseArgs(java.lang.String[] args)
Reads the argument vector and constructs a CommandLine object containing params |
void |
setAction(QueueTool.Actions action)
Set action |
void |
setArgVerbose(boolean argVerbose)
Set verbose |
void |
setExecid(java.lang.String execid)
Set execid for use with kill action |
void |
verbose(java.lang.String message)
Logs verbose message via implementation specific log facility |
void |
warn(java.lang.String output)
Logs warning message via implementation specific log facility |
Methods inherited from class com.dtolabs.rundeck.core.cli.BaseTool |
---|
addToolOptions, exit, getCommandLine, getOptions, help, initOptions, run, setShouldExit, validateOptions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger log4j
public static final java.lang.String ACTION_LIST
public static final java.lang.String ACTION_KILL
public static final java.lang.String ACTION_FOLLOW
Constructor Detail |
---|
public QueueTool()
public QueueTool(CLIToolLogger logger)
logger
- the loggerpublic QueueTool(Framework framework)
framework
- frameworkpublic QueueTool(Framework framework, CLIToolLogger logger)
framework
- the frameworklogger
- the loggerMethod Detail |
---|
public QueueTool.Actions getAction()
public void setAction(QueueTool.Actions action)
action
- the actionpublic java.lang.String getExecid()
public void setExecid(java.lang.String execid)
execid
- execution IDpublic boolean isArgVerbose()
public void setArgVerbose(boolean argVerbose)
argVerbose
- is verbosepublic static void main(java.lang.String[] args) throws java.lang.Exception
BaseTool.run(String[])
.
args
- command line arg vector
java.lang.Exception
- action errorprotected boolean isUseHelpOption()
BaseTool
isUseHelpOption
in class BaseTool
public java.lang.String getHelpString()
BaseTool
getHelpString
in class BaseTool
public org.apache.commons.cli.CommandLine parseArgs(java.lang.String[] args) throws CLIToolOptionsException
CommandLine
object containing params
parseArgs
in interface CLITool
parseArgs
in class BaseTool
args
- the cli arg vector
CLIToolOptionsException
- if arguments are incorrectprotected void go() throws QueueToolException, CLIToolOptionsException
go
in class BaseTool
QueueToolException
- if an error occurs
CLIToolOptionsException
public static boolean followAction(java.lang.String execid, boolean restart, ConsoleExecutionFollowReceiver.Mode mode, Framework framework, java.io.PrintStream out, BaseLogger logger) throws CentralDispatcherException
mode
- follow modeframework
- frameworkout
- output for progress markslogger
- logger for output of log linesexecid
- the execution id
CentralDispatcherException
- if any error occurspublic void log(java.lang.String output)
BaseLogger
log
in interface BaseLogger
output
- message to logpublic void error(java.lang.String output)
BaseLogger
error
in interface BaseLogger
output
- message to logpublic void warn(java.lang.String output)
BaseLogger
warn
in interface BaseLogger
output
- message to logpublic void verbose(java.lang.String message)
verbose
in interface BaseLogger
message
- message to logpublic void debug(java.lang.String message)
BaseLogger
debug
in interface BaseLogger
message
- message to log
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |