public abstract class Command extends Object implements org.cyclopsgroup.jcli.AutoCompletable
| Constructor and Description |
|---|
Command() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
doSuggestArgument()
Provide a list of possible arguments for auto completion.
|
protected List<String> |
doSuggestOption(String optionName)
Provide a list of possible option values for auto completion
|
abstract void |
execute()
Execute command
|
Session |
getSession() |
boolean |
isHelp() |
void |
setHelp(boolean help) |
void |
setSession(Session session) |
List<String> |
suggestArgument(String partialArg) |
List<String> |
suggestOption(String name,
String partialValue) |
protected List<String> doSuggestArgument() throws IOException, JMException
IOException - IO errorsJMException - JMX problemoprotected List<String> doSuggestOption(String optionName) throws IOException, JMException
optionName - Name of optionIOException - Network communication errorsJMException - JMX errorspublic abstract void execute()
throws IOException,
JMException
IOException - IO errorsJMException - JMX errorspublic final Session getSession()
public final boolean isHelp()
@Option(name="h",
longName="help",
description="Display usage")
public final void setHelp(boolean help)
help - True to display usagepublic final void setSession(Session session)
session - Session where command runspublic final List<String> suggestArgument(String partialArg)
suggestArgument in interface org.cyclopsgroup.jcli.AutoCompletableCopyright © 2008–2019. All rights reserved.