@Service(name="osgi-shell") @PerLookup public class LocalOSGiShellCommand extends CLICommand
Modifier and Type | Field and Description |
---|---|
protected static String |
REMOTE_COMMAND |
protected static String |
SESSION_OPTION |
protected static String |
SESSION_OPTION_EXECUTE |
protected static String |
SESSION_OPTION_START |
protected static String |
SESSION_OPTION_STOP |
protected static String |
SESSIONID_OPTION |
argv, ASADMIN, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, lineReader, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, terminal, WARNING
Constructor and Description |
---|
LocalOSGiShellCommand() |
Modifier and Type | Method and Description |
---|---|
protected String[] |
enhanceForTarget(String[] args) |
protected int |
executeCommand()
Execute the command using the options in options and the
operands in operands.
|
void |
postConstruct()
Initialise the logger after being instantiated by HK2.
|
protected String[] |
prepareArguments(String sessionId,
String[] args) |
protected String |
startSession() |
protected int |
stopSession(String sessionId) |
protected Collection<CommandModel.ParamModel> |
usageOptions()
In the usage message modify the --printprompt option to have a
default based on the --interactive option.
|
protected void |
validate()
The validate method validates that the type and quantity of
parameters and operands matches the requirements for this
command.
|
buildLineReader, buildTerminal, checkHelp, closeTerminal, execute, execute, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getManPage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, prepare, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString
protected static final String REMOTE_COMMAND
protected static final String SESSIONID_OPTION
protected static final String SESSION_OPTION
protected static final String SESSION_OPTION_EXECUTE
protected static final String SESSION_OPTION_START
protected static final String SESSION_OPTION_STOP
protected String startSession() throws CommandException
CommandException
protected int stopSession(String sessionId) throws CommandException
CommandException
protected void validate() throws CommandException, CommandValidationException
validate
in class CLICommand
CommandException
- if execution of the command failsCommandValidationException
- if there's something wrong
with the options or argumentsprotected Collection<CommandModel.ParamModel> usageOptions()
usageOptions
in class CLICommand
protected int executeCommand() throws CommandException, CommandValidationException
CLICommand
executeCommand
in class CLICommand
CommandException
- if execution of the command failsCommandValidationException
- if there's something wrong
with the options or argumentspublic void postConstruct()
CLICommand
postConstruct
in interface org.glassfish.hk2.api.PostConstruct
postConstruct
in class CLICommand
Copyright © 2019. All rights reserved.