|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.tools.cli.CLI
public class CLI
The CLI class is a utility that provides a Command Line Interface (CLI) for interfacing with the Rio components
| Nested Class Summary | |
|---|---|
protected static class |
CLI.EasterEggHandler
Handle easter eggs command |
protected static class |
CLI.EmptyHandler
Empty impl |
protected static class |
CLI.HelpHandler
Handle the help command |
static class |
CLI.HttpHandler
Handle http command |
protected static class |
CLI.JConsoleHandler
Handle jconsole command |
static class |
CLI.LoginCallbackHandler
|
static class |
CLI.OptionHandlerDesc
Command line option handler descriptor |
protected static class |
CLI.SettingsHandler
Handle the Set command |
static class |
CLI.StatsHandler
Handle stats command |
static class |
CLI.StopHandler
Handle the destroy command |
| Field Summary | |
|---|---|
protected String |
cliName
|
static String |
COMPONENT
|
protected static CLI |
instance
|
static Logger |
logger
|
protected Map<String,CLI.OptionHandlerDesc> |
optionMap
|
protected String |
prompt
|
| Constructor Summary | |
|---|---|
protected |
CLI()
|
| Method Summary | |
|---|---|
protected static void |
ensureSecurityManager()
Utility routine that sets a security manager if one isn't already present. |
Configuration |
getConfiguration()
Get the Configuration |
static CLI |
getInstance()
|
String |
getInteractiveUsage()
Get usage for an interactive session |
OptionHandler |
getOptionHandler(String option)
Get an OptionHandler for an option |
PrintStream |
getOutput()
|
ServiceFinder |
getServiceFinder()
Get the ServiceFinder |
static String[] |
initCLI(String[] args)
Initialize the CLI, parsing arguments, loading configuration and creating optional OptionHandler instances |
protected void |
loadOptionHandlers(Configuration config)
|
static void |
main(String[] args)
|
boolean |
validCommand(String command)
Validate command argument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT
public static Logger logger
protected String cliName
protected String prompt
protected final Map<String,CLI.OptionHandlerDesc> optionMap
protected static CLI instance
| Constructor Detail |
|---|
protected CLI()
| Method Detail |
|---|
public static CLI getInstance()
protected static void ensureSecurityManager()
public String getInteractiveUsage()
public boolean validCommand(String command)
command - The command to validate, must not be null
NullPointerException - if the command parameter is nullpublic PrintStream getOutput()
public OptionHandler getOptionHandler(String option)
OptionHandler for an option
option - The option to use, must not be null
OptionHandler for the option.
A new OptionHandler is created each time. If an OptionHandler cannot
be found for the provided option name, return null
NullPointerException - if the option parameter is null
protected void loadOptionHandlers(Configuration config)
throws ConfigurationException
ConfigurationExceptionpublic ServiceFinder getServiceFinder()
public Configuration getConfiguration()
public static String[] initCLI(String[] args)
throws Throwable
args - Command line arguments to parse, must not be null
Throwable - if anything at all happens that is not supposed to happenpublic static void main(String[] args)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||