@Contract
public interface CommandRunner
Modifier and Type | Interface and Description |
---|---|
static interface |
CommandRunner.CommandInvocation
CommandInvocation defines a command excecution context like the requested
name of the command to execute, the parameters of the command, etc...
|
Modifier and Type | Method and Description |
---|---|
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.
|
BufferedReader |
getHelp(CommandModel model)
Returns manpage for the command.
|
CommandModel |
getModel(String name,
Logger logger)
Returns the command model for a command name for the null scope
|
CommandModel |
getModel(String scope,
String name,
Logger logger)
Returns the command model for a command name
|
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
|
ActionReport getActionReport(String name)
name
- actiopn report type nameCommandModel getModel(String name, Logger logger)
name
- command namelogger
- logger to log any error messagesCommandModel getModel(String scope, String name, Logger logger)
scope
- the scope (or namespace) for the commandname
- command namelogger
- logger to log any error messagesBufferedReader getHelp(CommandModel model)
model
- of commandboolean validateCommandModelETag(AdminCommand command, String eTag)
command
- Command to be checkedeTag
- ETag to validateboolean validateCommandModelETag(CommandModel model, String eTag)
model
- of command to be checkedeTag
- ETag to validateAdminCommand getCommand(String commandName, ActionReport report, Logger logger)
commandName
- command name as typed by usersreport
- report used to communicate command status back to the userlogger
- logger to logAdminCommand getCommand(String scope, String commandName, ActionReport report, Logger logger)
scope
- the scope (or namespace) for the commandcommandName
- command name as typed by usersreport
- report used to communicate command status back to the userlogger
- logger to logCommandRunner.CommandInvocation getCommandInvocation(String name, ActionReport report, Subject subject)
name
- name of the requested command to invokereport
- where to place the status of the command executionsubject
- the Subject under which to execute the commandCommandRunner.CommandInvocation getCommandInvocation(String scope, String name, ActionReport report, Subject subject)
scope
- 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 commandCommandRunner.CommandInvocation getCommandInvocation(String name, ActionReport report, Subject subject, boolean isNotify)
name
- 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 enabledCommandRunner.CommandInvocation getCommandInvocation(String scope, String name, ActionReport report, Subject subject, boolean isNotify)
scope
- 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 commandisNotify
- should notification be enabledCopyright © 2018. All rights reserved.