@Service public class CommandRunnerImpl extends Object implements CommandRunner
CommandRunner.CommandInvocation| Constructor and Description |
|---|
CommandRunnerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
executeFromCheckpoint(JobManager.Checkpoint checkpoint,
boolean revert,
AdminCommandEventBroker eventBroker) |
ActionReport |
getActionReport(String name)
Returns an initialized ActionReport instance for the passed type or
null if it cannot be found.
|
AdminCommand |
getCommand(String commandName,
ActionReport report,
Logger logger)
Obtain and return the command implementation defined by
the passed commandName for the null scope.
|
AdminCommand |
getCommand(String scope,
String commandName,
ActionReport report,
Logger logger)
Obtain and return the command implementation defined by
the passed commandName.
|
CommandRunner.CommandInvocation |
getCommandInvocation(String name,
ActionReport report,
Subject subject)
Obtain a new command invocation object for the null scope.
|
CommandRunner.CommandInvocation |
getCommandInvocation(String name,
ActionReport report,
Subject subject,
boolean isNotify)
Obtain a new command invocation object for the null scope.
|
CommandRunner.CommandInvocation |
getCommandInvocation(String scope,
String name,
ActionReport report,
Subject subject)
Obtain a new command invocation object.
|
CommandRunner.CommandInvocation |
getCommandInvocation(String scope,
String name,
ActionReport report,
Subject subject,
boolean isNotify)
Obtain a new command invocation object.
|
void |
getHelp(AdminCommand command,
ActionReport report) |
BufferedReader |
getHelp(CommandModel model)
Returns manpage for the command.
|
static BufferedReader |
getManPage(String commandName,
CommandModel model)
Return an InputStream for the man page for the named command.
|
CommandModel |
getModel(String commandName,
Logger logger)
Returns the command model for a command name.
|
CommandModel |
getModel(String scope,
String commandName,
Logger logger)
Returns the command model for a command name.
|
static boolean |
injectParameters(CommandModel model,
Object injectionTarget,
org.jvnet.hk2.config.InjectionResolver<Param> injector,
ActionReport report) |
boolean |
validateCommandModelETag(AdminCommand command,
String eTag)
Checks if given command model eTag is equal to current command model eTag
|
boolean |
validateCommandModelETag(CommandModel model,
String eTag)
Checks if given command model eTag is equal to current command model eTag
|
public ActionReport getActionReport(String name)
getActionReport in interface CommandRunnername - action report type namepublic CommandModel getModel(String commandName, Logger logger)
getModel in interface CommandRunnercommandName - command namelogger - logger to log any error messagespublic CommandModel getModel(String scope, String commandName, Logger logger)
getModel in interface CommandRunnercommandName - command namelogger - logger to log any error messagesscope - the scope (or namespace) for the commandpublic boolean validateCommandModelETag(AdminCommand command, String eTag)
CommandRunnervalidateCommandModelETag in interface CommandRunnercommand - Command to be checkedeTag - ETag to validatepublic boolean validateCommandModelETag(CommandModel model, String eTag)
CommandRunnervalidateCommandModelETag in interface CommandRunnermodel - of command to be checkedeTag - ETag to validatepublic AdminCommand getCommand(String commandName, ActionReport report, Logger logger)
getCommand in interface CommandRunnercommandName - command name as typed by usersreport - report used to communicate command status back to the userlogger - logger to logpublic AdminCommand getCommand(String scope, String commandName, ActionReport report, Logger logger)
getCommand in interface CommandRunnercommandName - command name as typed by usersreport - report used to communicate command status back to the userlogger - logger to logscope - the scope (or namespace) for the commandpublic CommandRunner.CommandInvocation getCommandInvocation(String name, ActionReport report, Subject subject)
CommandRunnergetCommandInvocation in interface CommandRunnername - name of the requested command to invokereport - where to place the status of the command executionsubject - the Subject under which to execute the commandpublic CommandRunner.CommandInvocation getCommandInvocation(String scope, String name, ActionReport report, Subject subject)
CommandRunnergetCommandInvocation in interface CommandRunnerscope - the scope (or namespace) for the commandname - name of the requested command to invokereport - where to place the status of the command executionsubject - the Subject under which to execute the commandpublic CommandRunner.CommandInvocation getCommandInvocation(String name, ActionReport report, Subject subject, boolean isNotify)
getCommandInvocation in interface CommandRunnername - name of the requested command to invokereport - where to place the status of the command executionsubject - the Subject under which to execute the commandisNotify - should notification be enabledpublic CommandRunner.CommandInvocation getCommandInvocation(String scope, String name, ActionReport report, Subject subject, boolean isNotify)
getCommandInvocation in interface CommandRunnerscope - the scope (or name space) for the commandname - name of the requested command to invokereport - where to place the status of the command executionsubject - the Subject under which to execute the commandisNotify - Should notification be enabledpublic static boolean injectParameters(CommandModel model, Object injectionTarget, org.jvnet.hk2.config.InjectionResolver<Param> injector, ActionReport report)
public BufferedReader getHelp(CommandModel model) throws com.sun.enterprise.v3.admin.CommandNotFoundException
CommandRunnergetHelp in interface CommandRunnermodel - of commandcom.sun.enterprise.v3.admin.CommandNotFoundExceptionpublic void getHelp(AdminCommand command, ActionReport report)
public static BufferedReader getManPage(String commandName, CommandModel model)
public void executeFromCheckpoint(JobManager.Checkpoint checkpoint, boolean revert, AdminCommandEventBroker eventBroker)
Copyright © 2017. All rights reserved.