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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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.CommandRunner.CommandInvocation
inbound(Payload.Inbound inbound)
Sets the data carried with the request (could be an attachment)CommandRunner.CommandInvocation
listener(String nameRegexp, AdminCommandEventBroker.AdminCommandListener listener)
Register new event listener.CommandRunner.CommandInvocation
managedJob()
Set the AdminCommand to be a managed jobCommandRunner.CommandInvocation
outbound(Payload.Outbound outbound)
Sets the data carried with the responseCommandRunner.CommandInvocation
parameters(CommandParameters params)
Sets the command parameters as a typed intefaceCommandRunner.CommandInvocation
parameters(ParameterMap params)
Sets the command parameters as a ParameterMap.CommandRunner.CommandInvocation
progressStatusChild(ProgressStatus ps)
Register child of ProgressStatus.ActionReport
report()
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
-
-