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 ActionReport
getActionReport()
Returns the Reporter for this actionAdminCommandEventBroker
getEventBroker()
Simple event broker for inter command communication mostly from server to client.Payload.Inbound
getInboundPayload()
Returns the inbound payload, from the admin client, that accompanied the command request.String
getJobId()
Id of current job.Logger
getLogger()
Returns the LoggerPayload.Outbound
getOutboundPayload()
Returns a reference to the outbound payload so a command implementation can populate the payload for return to the admin client.ProgressStatus
getProgressStatus()
ProgressStatus can be used to inform about step by step progress of the command.Subject
getSubject()
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 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:
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
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@Progress
annotation is on the command implementation.- Returns:
-
getEventBroker
AdminCommandEventBroker getEventBroker()
Simple event broker for inter command communication mostly from server to client. (Command to caller).- Returns:
-
getJobId
String getJobId()
Id of current job. Only managed commands has job id.- Returns:
-
-