Package org.glassfish.api.admin
Class AdminCommandContextForInstance
java.lang.Object
org.glassfish.api.admin.AdminCommandContextForInstance
- All Implemented Interfaces:
Serializable
,AdminCommandContext
,ExecutionContext
Most of
AdminCommandContext
attributes are used in any phase of command execution (supplemental commands,
replication) but some of them must be different for every instance. This wrapper provides such staff.- Author:
- mmares
- See Also:
-
Constructor Summary
ConstructorDescriptionAdminCommandContextForInstance
(AdminCommandContext wrapped, ProgressStatus progressStatus) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Reporter for this actionSimple event broker for inter command communication mostly from server to client.Returns the inbound payload, from the admin client, that accompanied the command request.getJobId()
Id of current job.Returns the LoggerReturns a reference to the outbound payload so a command implementation can populate the payload for return to the admin client.ProgressStatus can be used to inform about step by step progress of the command.Returns the Subject associated with this command context.void
setActionReport
(ActionReport newReport) Change the Reporter for this actionvoid
setInboundPayload
(Payload.Inbound newInboundPayload) Changes the inbound payload for this action.void
setOutboundPayload
(Payload.Outbound newOutboundPayload) Changes the outbound payload for this action.void
setSubject
(Subject subject) Sets the Subject to be associated with this command context.
-
Constructor Details
-
AdminCommandContextForInstance
-
-
Method Details
-
getActionReport
Description copied from interface:AdminCommandContext
Returns the Reporter for this action- Specified by:
getActionReport
in interfaceAdminCommandContext
- Returns:
- ActionReport implementation suitable for the client
-
setActionReport
Description copied from interface:AdminCommandContext
Change the Reporter for this action- Specified by:
setActionReport
in interfaceAdminCommandContext
- Parameters:
newReport
- The ActionReport to set.
-
getLogger
Description copied from interface:AdminCommandContext
Returns the Logger- Specified by:
getLogger
in interfaceAdminCommandContext
- Specified by:
getLogger
in interfaceExecutionContext
- Returns:
- the logger
-
getInboundPayload
Description copied from interface:AdminCommandContext
Returns the inbound payload, from the admin client, that accompanied the command request.- Specified by:
getInboundPayload
in interfaceAdminCommandContext
- Returns:
- the inbound payload
-
setInboundPayload
Description copied from interface:AdminCommandContext
Changes the inbound payload for this action.- Specified by:
setInboundPayload
in interfaceAdminCommandContext
- Parameters:
newInboundPayload
- inbound payload to set.
-
getOutboundPayload
Description copied from interface:AdminCommandContext
Returns a reference to the outbound payload so a command implementation can populate the payload for return to the admin client.- Specified by:
getOutboundPayload
in interfaceAdminCommandContext
- Returns:
- the outbound payload
-
setOutboundPayload
Description copied from interface:AdminCommandContext
Changes the outbound payload for this action.- Specified by:
setOutboundPayload
in interfaceAdminCommandContext
- Parameters:
newOutboundPayload
- outbound payload to set.
-
getSubject
Description copied from interface:AdminCommandContext
Returns the Subject associated with this command context.- Specified by:
getSubject
in interfaceAdminCommandContext
- Returns:
- the Subject
-
setSubject
Description copied from interface:AdminCommandContext
Sets the Subject to be associated with this command context.- Specified by:
setSubject
in interfaceAdminCommandContext
-
getProgressStatus
Description copied from interface:AdminCommandContext
ProgressStatus can be used to inform about step by step progress of the command. It is always ready to use but propagated to the client only if@Progress
annotation is on the command implementation.- Specified by:
getProgressStatus
in interfaceAdminCommandContext
-
getEventBroker
Description copied from interface:AdminCommandContext
Simple event broker for inter command communication mostly from server to client. (Command to caller).- Specified by:
getEventBroker
in interfaceAdminCommandContext
-
getJobId
Description copied from interface:AdminCommandContext
Id of current job. Only managed commands has job id.- Specified by:
getJobId
in interfaceAdminCommandContext
-