public class RemoteCLICommand extends CLICommand
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
reExecutedOperands |
protected org.glassfish.api.admin.ParameterMap |
reExecutedOptions |
argv, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, WARNING| Constructor and Description |
|---|
RemoteCLICommand()
Construct a new remote command object.
|
RemoteCLICommand(String name,
ProgramOptions po,
Environment env)
Construct a new remote command object.
|
RemoteCLICommand(String name,
ProgramOptions po,
Environment env,
String responseFormatType,
OutputStream userOut)
Construct a new remote command object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
execute(String... argv)
Execute this command with the given arguemnts.
|
org.glassfish.api.ActionReport |
executeAndReturnActionReport(String... args)
Execute the command and return the main attributes from the manifest
instead of writing out the output.
|
String |
executeAndReturnOutput(String... args)
Execute the command and return the output as a string instead of writing
it out.
|
protected int |
executeCommand()
Runs the command using the specified arguments.
|
BufferedReader |
getManPage()
Get the man page from the server.
|
String |
getUsage()
Get the usage text.
|
protected void |
inject()
Inject this instance with the final values of all the command
parameters.
|
protected void |
parse()
The parse method sets the options and operands fields
based on the content of the command line arguments.
|
protected void |
prepare()
The prepare method must ensure that the commandModel field is set.
|
protected void |
prevalidate()
The prevalidate method supplies missing options from
the environment.
|
void |
registerListener(String regexpForName,
org.glassfish.api.admin.AdminCommandEventBroker.AdminCommandListener listener) |
void |
setFileOutputDirectory(File dir)
Set the directory in which any returned files will be stored.
|
protected void |
validate()
If it's a help request, don't prompt for any missing options.
|
checkHelp, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, initializeLogger, initializePasswords, ok, postConstruct, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptionspublic RemoteCLICommand()
throws org.glassfish.api.admin.CommandException
org.glassfish.api.admin.CommandExceptionpublic RemoteCLICommand(String name, ProgramOptions po, Environment env) throws org.glassfish.api.admin.CommandException
org.glassfish.api.admin.CommandExceptionpublic RemoteCLICommand(String name, ProgramOptions po, Environment env, String responseFormatType, OutputStream userOut) throws org.glassfish.api.admin.CommandException
org.glassfish.api.admin.CommandExceptionpublic int execute(String... argv) throws org.glassfish.api.admin.CommandException
CLICommandexecute in class CLICommandorg.glassfish.api.admin.CommandException - if execution of the command failsorg.glassfish.api.admin.CommandValidationException - if there's something wrong
with the options or argumentspublic void setFileOutputDirectory(File dir)
protected void prepare()
throws org.glassfish.api.admin.CommandException,
org.glassfish.api.admin.CommandValidationException
CLICommandprepare in class CLICommandorg.glassfish.api.admin.CommandExceptionorg.glassfish.api.admin.CommandValidationExceptionprotected void prevalidate()
throws org.glassfish.api.admin.CommandException
CLICommandprevalidate in class CLICommandorg.glassfish.api.admin.CommandException - if execution of the command failsorg.glassfish.api.admin.CommandValidationException - if there's something wrong
with the options or argumentsprotected void parse()
throws org.glassfish.api.admin.CommandException
CLICommandparse in class CLICommandorg.glassfish.api.admin.CommandException - if execution of the command failsorg.glassfish.api.admin.CommandValidationException - if there's something wrong
with the options or argumentsprotected void validate()
throws org.glassfish.api.admin.CommandException,
org.glassfish.api.admin.CommandValidationException
validate in class CLICommandorg.glassfish.api.admin.CommandException - if execution of the command failsorg.glassfish.api.admin.CommandValidationException - if there's something wrong
with the options or argumentsprotected void inject()
throws org.glassfish.api.admin.CommandException
CLICommandinject in class CLICommandorg.glassfish.api.admin.CommandException - if execution of the command failsorg.glassfish.api.admin.CommandValidationException - if there's something wrong
with the options or argumentsprotected int executeCommand()
throws org.glassfish.api.admin.CommandException,
org.glassfish.api.admin.CommandValidationException
executeCommand in class CLICommandorg.glassfish.api.admin.CommandException - if execution of the command failsorg.glassfish.api.admin.CommandValidationException - if there's something wrong
with the options or argumentspublic String executeAndReturnOutput(String... args) throws org.glassfish.api.admin.CommandException, org.glassfish.api.admin.CommandValidationException
org.glassfish.api.admin.CommandExceptionorg.glassfish.api.admin.CommandValidationExceptionpublic org.glassfish.api.ActionReport executeAndReturnActionReport(String... args) throws org.glassfish.api.admin.CommandException, org.glassfish.api.admin.CommandValidationException
org.glassfish.api.admin.CommandExceptionorg.glassfish.api.admin.CommandValidationExceptionpublic String getUsage()
getUsage in class CLICommandpublic BufferedReader getManPage()
getManPage in class CLICommandpublic void registerListener(String regexpForName, org.glassfish.api.admin.AdminCommandEventBroker.AdminCommandListener listener)
Copyright © 2019. All rights reserved.