|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.admin.cli.CLICommand
com.sun.enterprise.admin.cli.remote.RemoteCommand
public class RemoteCommand
A remote command handled by the asadmin CLI.
| Field Summary |
|---|
| Fields inherited from class com.sun.enterprise.admin.cli.CLICommand |
|---|
argv, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, WARNING |
| Constructor Summary | |
|---|---|
RemoteCommand()
Construct a new remote command object. |
|
RemoteCommand(String name,
ProgramOptions po,
Environment env)
Construct a new remote command object. |
|
RemoteCommand(String name,
ProgramOptions po,
Environment env,
String responseFormatType,
OutputStream userOut)
Construct a new remote command object. |
|
| Method Summary | |
|---|---|
protected boolean |
checkHelp()
We do all our help processing in executeCommand. |
Map<String,String> |
executeAndReturnAttributes(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 |
prepare()
The prepare method must ensure that the commandModel field is set. |
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. |
| Methods inherited from class com.sun.enterprise.admin.cli.CLICommand |
|---|
execute, getBooleanOption, getBriefCommandUsage, getCommand, getCommandUsage, getName, getOperandModel, getOption, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, toString, usageOptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteCommand()
throws CommandException
CommandException
public RemoteCommand(String name,
ProgramOptions po,
Environment env)
throws CommandException
CommandException
public RemoteCommand(String name,
ProgramOptions po,
Environment env,
String responseFormatType,
OutputStream userOut)
throws CommandException
CommandException| Method Detail |
|---|
public void setFileOutputDirectory(File dir)
protected void prepare()
throws CommandException,
CommandValidationException
CLICommand
prepare in class CLICommandCommandException
CommandValidationException
protected void validate()
throws CommandException,
CommandValidationException
validate in class CLICommandCommandException - if execution of the command fails
CommandValidationException - if there's something wrong
with the options or arguments
protected boolean checkHelp()
throws CommandException,
CommandValidationException
checkHelp in class CLICommandCommandException
CommandValidationException
protected int executeCommand()
throws CommandException,
CommandValidationException
executeCommand in class CLICommandCommandException - if execution of the command fails
CommandValidationException - if there's something wrong
with the options or arguments
public String executeAndReturnOutput(String... args)
throws CommandException,
CommandValidationException
CommandException
CommandValidationException
public Map<String,String> executeAndReturnAttributes(String... args)
throws CommandException,
CommandValidationException
CommandException
CommandValidationExceptionpublic String getUsage()
getUsage in class CLICommandpublic BufferedReader getManPage()
getManPage in class CLICommand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||