Package com.sun.enterprise.v3.admin
Class AdminCommandInstanceImpl
- java.lang.Object
-
- com.sun.enterprise.admin.remote.AdminCommandStateImpl
-
- com.sun.enterprise.v3.admin.AdminCommandInstanceImpl
-
- All Implemented Interfaces:
Serializable,AdminCommandState,Job
public class AdminCommandInstanceImpl extends AdminCommandStateImpl implements Job
Represents running (or finished) command instance.- Author:
- Martin Mares, Bhakti Mehta
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.admin.AdminCommandState
AdminCommandState.State
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.admin.remote.AdminCommandStateImpl
actionReport, id, state
-
Fields inherited from interface org.glassfish.api.admin.AdminCommandState
EVENT_STATE_CHANGED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAdminCommandInstanceImpl(String id, String name, String commandScope, Subject sub, boolean managedJob, ParameterMap parameters)protectedAdminCommandInstanceImpl(String name, String scope, Subject sub, boolean managedJob, ParameterMap parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete(ActionReport report, Payload.Outbound outbound)longgetCommandCompletionDate()longgetCommandExecutionDate()CommandProgressgetCommandProgress()Command progress only if it is supported by commandAdminCommandEventBrokergetEventBroker()FilegetJobsFile()StringgetName()ParameterMapgetParameters()Payload.OutboundgetPayload()StringgetScope()List<String>getSubjectUsernames()booleanisOutboundPayloadEmpty()Are there data in outbound payload or not.voidrevert()Change state to reverting.voidsetCommandProgress(CommandProgress commandProgress)voidsetEventBroker(AdminCommandEventBroker eventBroker)voidsetFailToRetryable(boolean value)Job will be considered as retryable after fail.voidsetJobsFile(File jobsFile)protected voidsetState(AdminCommandState.State state)-
Methods inherited from class com.sun.enterprise.admin.remote.AdminCommandStateImpl
complete, getActionReport, getId, getState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.glassfish.api.admin.AdminCommandState
complete, getActionReport, getId, getState
-
-
-
-
Constructor Detail
-
AdminCommandInstanceImpl
protected AdminCommandInstanceImpl(String id, String name, String commandScope, Subject sub, boolean managedJob, ParameterMap parameters)
-
AdminCommandInstanceImpl
protected AdminCommandInstanceImpl(String name, String scope, Subject sub, boolean managedJob, ParameterMap parameters)
-
-
Method Detail
-
getCommandProgress
public CommandProgress getCommandProgress()
Description copied from interface:JobCommand progress only if it is supported by command- Specified by:
getCommandProgressin interfaceJob
-
setCommandProgress
public void setCommandProgress(CommandProgress commandProgress)
- Specified by:
setCommandProgressin interfaceJob
-
getEventBroker
public AdminCommandEventBroker getEventBroker()
- Specified by:
getEventBrokerin interfaceJob
-
setEventBroker
public void setEventBroker(AdminCommandEventBroker eventBroker)
-
getJobsFile
public File getJobsFile()
- Specified by:
getJobsFilein interfaceJob
-
setJobsFile
public void setJobsFile(File jobsFile)
- Specified by:
setJobsFilein interfaceJob
-
getSubjectUsernames
public List<String> getSubjectUsernames()
- Specified by:
getSubjectUsernamesin interfaceJob
-
setState
protected void setState(AdminCommandState.State state)
- Overrides:
setStatein classAdminCommandStateImpl
-
isOutboundPayloadEmpty
public boolean isOutboundPayloadEmpty()
Description copied from interface:AdminCommandStateAre there data in outbound payload or not.- Specified by:
isOutboundPayloadEmptyin interfaceAdminCommandState- Overrides:
isOutboundPayloadEmptyin classAdminCommandStateImpl
-
complete
public void complete(ActionReport report, Payload.Outbound outbound)
-
revert
public void revert()
Description copied from interface:JobChange state to reverting. Command Can use it to send info about reverting to Job management infrastructure.
-
getCommandExecutionDate
public long getCommandExecutionDate()
- Specified by:
getCommandExecutionDatein interfaceJob
-
getPayload
public Payload.Outbound getPayload()
- Specified by:
getPayloadin interfaceJob
-
getCommandCompletionDate
public long getCommandCompletionDate()
- Specified by:
getCommandCompletionDatein interfaceJob
-
setFailToRetryable
public void setFailToRetryable(boolean value)
Description copied from interface:JobJob will be considered as retryable after fail. It means that checkpoint will not be deleted and revert or continue can be decided by the user.- Specified by:
setFailToRetryablein interfaceJob
-
getParameters
public ParameterMap getParameters()
- Specified by:
getParametersin interfaceJob
-
-