Package org.glassfish.api.admin
Interface AdminCommandContext
-
- All Superinterfaces:
ExecutionContext,Serializable
- All Known Implementing Classes:
AdminCommandContextForInstance,AdminCommandContextImpl
public interface AdminCommandContext extends ExecutionContext, Serializable
Useful services for administrative commands implementation- Author:
- Jerome Dochez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActionReportgetActionReport()Returns the Reporter for this actionAdminCommandEventBrokergetEventBroker()Simple event broker for inter command communication mostly from server to client.Payload.InboundgetInboundPayload()Returns the inbound payload, from the admin client, that accompanied the command request.StringgetJobId()Id of current job.LoggergetLogger()Returns the LoggerPayload.OutboundgetOutboundPayload()Returns a reference to the outbound payload so a command implementation can populate the payload for return to the admin client.ProgressStatusgetProgressStatus()ProgressStatus can be used to inform about step by step progress of the command.SubjectgetSubject()Returns the Subject associated with this command context.voidsetActionReport(ActionReport newReport)Change the Reporter for this actionvoidsetInboundPayload(Payload.Inbound newInboundPayload)Changes the inbound payload for this action.voidsetOutboundPayload(Payload.Outbound newOutboundPayload)Changes the outbound payload for this action.voidsetSubject(Subject subject)Sets the Subject to be associated with this command context.
-
-
-
Method Detail
-
getActionReport
ActionReport getActionReport()
Returns the Reporter for this action- Returns:
- ActionReport implementation suitable for the client
-
setActionReport
void setActionReport(ActionReport newReport)
Change the Reporter for this action- Parameters:
newReport- The ActionReport to set.
-
getLogger
Logger getLogger()
Returns the Logger- Specified by:
getLoggerin 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
void setInboundPayload(Payload.Inbound newInboundPayload)
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
void setOutboundPayload(Payload.Outbound newOutboundPayload)
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
void setSubject(Subject subject)
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@Progressannotation 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.
-
-