Package org.glassfish.api.admin
Interface AdminCommandContext
- All Superinterfaces:
ExecutionContext
,Serializable
- All Known Implementing Classes:
AdminCommandContextForInstance
,AdminCommandContextImpl
Useful services for administrative commands implementation
- Author:
- Jerome Dochez
-
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.
-
Method Details
-
getActionReport
ActionReport getActionReport()Returns the Reporter for this action- Returns:
- ActionReport implementation suitable for the client
-
setActionReport
Change the Reporter for this action- Parameters:
newReport
- The ActionReport to set.
-
getLogger
Logger getLogger()Returns the Logger- Specified by:
getLogger
in interfaceExecutionContext
- Returns:
- the logger
-
getInboundPayload
Payload.Inbound getInboundPayload()Returns the inbound payload, from the admin client, that accompanied the command request.- Returns:
- the inbound payload
-
setInboundPayload
Changes the inbound payload for this action.- Parameters:
newInboundPayload
- inbound payload to set.
-
getOutboundPayload
Payload.Outbound getOutboundPayload()Returns a reference to the outbound payload so a command implementation can populate the payload for return to the admin client.- Returns:
- the outbound payload
-
setOutboundPayload
Changes the outbound payload for this action.- Parameters:
newOutboundPayload
- outbound payload to set.
-
getSubject
Subject getSubject()Returns the Subject associated with this command context.- Returns:
- the Subject
-
setSubject
Sets the Subject to be associated with this command context.- Parameters:
subject
-
-
getProgressStatus
ProgressStatus getProgressStatus()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. -
getEventBroker
AdminCommandEventBroker getEventBroker()Simple event broker for inter command communication mostly from server to client. (Command to caller). -
getJobId
String getJobId()Id of current job. Only managed commands has job id.
-