Package org.glassfish.api.admin
Class AdminCommandContextForInstance
- java.lang.Object
-
- org.glassfish.api.admin.AdminCommandContextForInstance
-
- All Implemented Interfaces:
Serializable,AdminCommandContext,ExecutionContext
public class AdminCommandContextForInstance extends Object implements AdminCommandContext
Most ofAdminCommandContextattributes 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AdminCommandContextForInstance(AdminCommandContext wrapped, ProgressStatus progressStatus)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
AdminCommandContextForInstance
public AdminCommandContextForInstance(AdminCommandContext wrapped, ProgressStatus progressStatus)
-
-
Method Detail
-
getActionReport
public ActionReport getActionReport()
Description copied from interface:AdminCommandContextReturns the Reporter for this action- Specified by:
getActionReportin interfaceAdminCommandContext- Returns:
- ActionReport implementation suitable for the client
-
setActionReport
public void setActionReport(ActionReport newReport)
Description copied from interface:AdminCommandContextChange the Reporter for this action- Specified by:
setActionReportin interfaceAdminCommandContext- Parameters:
newReport- The ActionReport to set.
-
getLogger
public Logger getLogger()
Description copied from interface:AdminCommandContextReturns the Logger- Specified by:
getLoggerin interfaceAdminCommandContext- Specified by:
getLoggerin interfaceExecutionContext- Returns:
- the logger
-
getInboundPayload
public Payload.Inbound getInboundPayload()
Description copied from interface:AdminCommandContextReturns the inbound payload, from the admin client, that accompanied the command request.- Specified by:
getInboundPayloadin interfaceAdminCommandContext- Returns:
- the inbound payload
-
setInboundPayload
public void setInboundPayload(Payload.Inbound newInboundPayload)
Description copied from interface:AdminCommandContextChanges the inbound payload for this action.- Specified by:
setInboundPayloadin interfaceAdminCommandContext- Parameters:
newInboundPayload- inbound payload to set.
-
getOutboundPayload
public Payload.Outbound getOutboundPayload()
Description copied from interface:AdminCommandContextReturns a reference to the outbound payload so a command implementation can populate the payload for return to the admin client.- Specified by:
getOutboundPayloadin interfaceAdminCommandContext- Returns:
- the outbound payload
-
setOutboundPayload
public void setOutboundPayload(Payload.Outbound newOutboundPayload)
Description copied from interface:AdminCommandContextChanges the outbound payload for this action.- Specified by:
setOutboundPayloadin interfaceAdminCommandContext- Parameters:
newOutboundPayload- outbound payload to set.
-
getSubject
public Subject getSubject()
Description copied from interface:AdminCommandContextReturns the Subject associated with this command context.- Specified by:
getSubjectin interfaceAdminCommandContext- Returns:
- the Subject
-
setSubject
public void setSubject(Subject subject)
Description copied from interface:AdminCommandContextSets the Subject to be associated with this command context.- Specified by:
setSubjectin interfaceAdminCommandContext
-
getProgressStatus
public ProgressStatus getProgressStatus()
Description copied from interface:AdminCommandContextProgressStatus 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.- Specified by:
getProgressStatusin interfaceAdminCommandContext
-
getEventBroker
public AdminCommandEventBroker getEventBroker()
Description copied from interface:AdminCommandContextSimple event broker for inter command communication mostly from server to client. (Command to caller).- Specified by:
getEventBrokerin interfaceAdminCommandContext
-
getJobId
public String getJobId()
Description copied from interface:AdminCommandContextId of current job. Only managed commands has job id.- Specified by:
getJobIdin interfaceAdminCommandContext
-
-