Package org.glassfish.api.admin
Interface CommandRunner.CommandInvocation
- Enclosing interface:
- CommandRunner
public 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...
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the command and populate the report with the command execution result.void
execute
(AdminCommand command) Executes the passed command with this context and populates the report with the execution result.inbound
(Payload.Inbound inbound) Sets the data carried with the request (could be an attachment)listener
(String nameRegexp, AdminCommandEventBroker.AdminCommandListener listener) Register new event listener.Set the AdminCommand to be a managed joboutbound
(Payload.Outbound outbound) Sets the data carried with the responseparameters
(CommandParameters params) Sets the command parameters as a typed intefaceparameters
(ParameterMap params) Sets the command parameters as a ParameterMap.Register child of ProgressStatus.report()
Current report.
-
Method Details
-
parameters
Sets the command parameters as a typed inteface- Parameters:
params
- the parameters- Returns:
- itself
-
parameters
Sets the command parameters as a ParameterMap.- Parameters:
params
- the parameters- Returns:
- itself
-
inbound
Sets the data carried with the request (could be an attachment)- Parameters:
inbound
- inbound data- Returns:
- itself
-
outbound
Sets the data carried with the response- Parameters:
outbound
- outbound data- Returns:
- itself
-
listener
CommandRunner.CommandInvocation listener(String nameRegexp, AdminCommandEventBroker.AdminCommandListener listener) Register new event listener.- Parameters:
nameRegexp
-listener
-- Returns:
- itself
-
progressStatusChild
Register child of ProgressStatus. Usable for command from command execution.- Parameters:
ps
-- Returns:
-
managedJob
CommandRunner.CommandInvocation managedJob()Set the AdminCommand to be a managed job -
report
ActionReport report()Current report. After command execution report can be changed by command -
execute
void execute()Executes the command and populate the report with the command execution result. Parameters must have been set before invoking this method. -
execute
Executes the passed command with this context and populates the report with the execution result. Parameters must be set before invoking this command.- Parameters:
command
- command implementation to execute
-