Class CommandProgressImpl
- java.lang.Object
-
- org.glassfish.api.admin.progress.ProgressStatusBase
-
- org.glassfish.api.admin.progress.ProgressStatusImpl
-
- com.sun.enterprise.admin.progress.CommandProgressImpl
-
- All Implemented Interfaces:
Serializable,CommandProgress,ProgressStatus
public class CommandProgressImpl extends ProgressStatusImpl implements CommandProgress, Serializable
Basic and probably only implementation ofCommandProgress.- Author:
- mmares
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCommandProgressImpl.LastChangedMessage-
Nested classes/interfaces inherited from class org.glassfish.api.admin.progress.ProgressStatusBase
ProgressStatusBase.ChildProgressStatus
-
-
Field Summary
-
Fields inherited from class org.glassfish.api.admin.progress.ProgressStatusBase
children, completed, currentStepCount, id, name, parent, totalStepCount
-
Fields inherited from interface org.glassfish.api.admin.CommandProgress
EVENT_PROGRESSSTATUS_CHANGE, EVENT_PROGRESSSTATUS_STATE
-
-
Constructor Summary
Constructors Constructor Description CommandProgressImpl(String name, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()Indicates the command is complete and no further progress status will be delivered.voidcomplete(String message)Indicates the command is complete and no further progress status will be delivered.ProgressStatusMirroringImplcreateMirroringChild(int allocatedSteps)Creates child for mirroring (supplemental commands)protected voidfireEvent(ProgressStatusEvent event)FiresProgressStatusEventto parent.DategetEndTime()Timestamp of command complete event ornullfor running commandStringgetId()Id is unique for any ProgressStatuses.StringgetLastMessage()StringgetName()DategetStartTime()Timestamp of command creationbooleanisSpinnerActive()voidsetEventBroker(AdminCommandEventBroker eventBroker)-
Methods inherited from class org.glassfish.api.admin.progress.ProgressStatusImpl
doCreateChild
-
Methods inherited from class org.glassfish.api.admin.progress.ProgressStatusBase
allocateStapsForChildProcess, completeSilently, computeCompletePortion, computeCompleteSteps, computeSumSteps, createChild, createChild, createChild, findById, getChildProgressStatuses, getChildren, getCurrentStepCount, getParrent, getRemainingStepCount, getTotalStepCount, isComplete, progress, progress, progress, progress, setCurrentStepCount, setTotalStepCount, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.glassfish.api.admin.CommandProgress
computeCompletePortion, computeSumSteps
-
Methods inherited from interface org.glassfish.api.admin.ProgressStatus
createChild, createChild, getRemainingStepCount, getTotalStepCount, isComplete, progress, progress, progress, progress, setCurrentStepCount, setTotalStepCount
-
-
-
-
Method Detail
-
fireEvent
protected void fireEvent(ProgressStatusEvent event)
Description copied from class:ProgressStatusBaseFiresProgressStatusEventto parent.- Overrides:
fireEventin classProgressStatusBase
-
setEventBroker
public void setEventBroker(AdminCommandEventBroker eventBroker)
- Specified by:
setEventBrokerin interfaceCommandProgress
-
createMirroringChild
public ProgressStatusMirroringImpl createMirroringChild(int allocatedSteps)
Description copied from interface:CommandProgressCreates child for mirroring (supplemental commands)- Specified by:
createMirroringChildin interfaceCommandProgress
-
getEndTime
public Date getEndTime()
Description copied from interface:CommandProgressTimestamp of command complete event ornullfor running command- Specified by:
getEndTimein interfaceCommandProgress
-
getStartTime
public Date getStartTime()
Description copied from interface:CommandProgressTimestamp of command creation- Specified by:
getStartTimein interfaceCommandProgress
-
getId
public String getId()
Description copied from interface:ProgressStatusId is unique for any ProgressStatuses. It is mainly used for remote communication.- Specified by:
getIdin interfaceCommandProgress- Specified by:
getIdin interfaceProgressStatus- Overrides:
getIdin classProgressStatusBase
-
getName
public String getName()
- Specified by:
getNamein interfaceCommandProgress- Overrides:
getNamein classProgressStatusBase
-
getLastMessage
public String getLastMessage()
- Specified by:
getLastMessagein interfaceCommandProgress
-
complete
public void complete()
Description copied from interface:ProgressStatusIndicates the command is complete and no further progress status will be delivered. Subsequent invocations of progress() will be ignored. This method also invokescomplete()on all child ProgressStatus objects. If this method is not invoked prior to the command completing the CLI framework will implicitly invokecomplete()for the ProgressStatus associated with the command.- Specified by:
completein interfaceProgressStatus- Overrides:
completein classProgressStatusBase
-
complete
public void complete(String message)
Description copied from interface:ProgressStatusIndicates the command is complete and no further progress status will be delivered. Subsequent invocations of progress() will be ignored. This method also invokescomplete()on all child ProgressStatus objects. If this method is not invoked prior to the command completing the CLI framework will implicitly invokecomplete()for the ProgressStatus associated with the command.- Specified by:
completein interfaceProgressStatus- Overrides:
completein classProgressStatusBase- Parameters:
message- to be displayed to the user.
-
isSpinnerActive
public boolean isSpinnerActive()
- Specified by:
isSpinnerActivein interfaceCommandProgress
-
-