Package org.glassfish.api.admin
Interface CommandRunner.CommandInvocation
-
- Enclosing interface:
- CommandRunner
public static interface CommandRunner.CommandInvocationCommandInvocation defines a command excecution context like the requested name of the command to execute, the parameters of the command, etc...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecute()Executes the command and populate the report with the command execution result.voidexecute(AdminCommand command)Executes the passed command with this context and populates the report with the execution result.CommandRunner.CommandInvocationinbound(Payload.Inbound inbound)Sets the data carried with the request (could be an attachment)CommandRunner.CommandInvocationlistener(String nameRegexp, AdminCommandEventBroker.AdminCommandListener listener)Register new event listener.CommandRunner.CommandInvocationmanagedJob()Set the AdminCommand to be a managed jobCommandRunner.CommandInvocationoutbound(Payload.Outbound outbound)Sets the data carried with the responseCommandRunner.CommandInvocationparameters(CommandParameters params)Sets the command parameters as a typed intefaceCommandRunner.CommandInvocationparameters(ParameterMap params)Sets the command parameters as a ParameterMap.CommandRunner.CommandInvocationprogressStatusChild(ProgressStatus ps)Register child of ProgressStatus.ActionReportreport()Current report.
-
-
-
Method Detail
-
parameters
CommandRunner.CommandInvocation parameters(CommandParameters params)
Sets the command parameters as a typed inteface- Parameters:
params- the parameters- Returns:
- itself
-
parameters
CommandRunner.CommandInvocation parameters(ParameterMap params)
Sets the command parameters as a ParameterMap.- Parameters:
params- the parameters- Returns:
- itself
-
inbound
CommandRunner.CommandInvocation inbound(Payload.Inbound inbound)
Sets the data carried with the request (could be an attachment)- Parameters:
inbound- inbound data- Returns:
- itself
-
outbound
CommandRunner.CommandInvocation outbound(Payload.Outbound 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
CommandRunner.CommandInvocation progressStatusChild(ProgressStatus ps)
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
void execute(AdminCommand command)
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
-
-