Class ProvisioningJob
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
org.eclipse.equinox.p2.operations.ProvisioningJob
- All Implemented Interfaces:
- Comparable<org.eclipse.core.internal.jobs.InternalJob>,- IAdaptable
- Direct Known Subclasses:
- LoadMetadataRepositoryJob,- ProfileModificationJob
Abstract class representing provisioning jobs.  Provisioning jobs
 can be run in the background by scheduling them, or they can
 be run by a client in a modal context.  An additional progress monitor
 can be set into the job for progress reporting.
- Since:
- 2.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intConstant which indicates that the job does not require a restart upon completion.static final intConstant which indicates that the job requires the user to restart in order to pick up the changes performed by the job.static final intConstant which indicates that the job requires the user to either restart or apply the configuration changes in order to pick up the changes performed by the job.Fields inherited from class org.eclipse.core.runtime.jobs.JobASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITINGFields inherited from class org.eclipse.core.internal.jobs.InternalJobmanager
- 
Constructor SummaryConstructorsConstructorDescriptionProvisioningJob(String name, ProvisioningSession session) Create a provisioning job with the given name that uses the provided provisioning session for retrieving any services needed.
- 
Method SummaryModifier and TypeMethodDescriptionprotected IStatusgetErrorStatus(String message, ProvisionException e) Return an error status that can be used to report the specified exception.intReturn the restart policy that is appropriate for this job.protected ProvisioningSessionReturn the provisioning session that is used by the receiver when retrieving necessary provisioning services.final IStatusrun(IProgressMonitor monitor) Executes this job.abstract IStatusrunModal(IProgressMonitor monitor) Perform the specific work involved in running this job in the current thread.voidMethods inherited from class org.eclipse.core.runtime.jobs.JobaddJobChangeListener, belongsTo, cancel, canceling, create, create, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRuleMethods inherited from class org.eclipse.core.internal.jobs.InternalJobcompareToMethods inherited from class org.eclipse.core.runtime.PlatformObjectgetAdapter
- 
Field Details- 
RESTART_NONEpublic static final int RESTART_NONEConstant which indicates that the job does not require a restart upon completion. This constant is typically used for operations that do not modify the running profile.- Since:
- 2.0
- See Also:
 
- 
RESTART_OR_APPLYpublic static final int RESTART_OR_APPLYConstant which indicates that the job requires the user to either restart or apply the configuration changes in order to pick up the changes performed by the job. This constant is typically used for operations that modify the running profile.- Since:
- 2.0
- See Also:
 
- 
RESTART_ONLYpublic static final int RESTART_ONLYConstant which indicates that the job requires the user to restart in order to pick up the changes performed by the job. This constant is typically used for operations that modify the running profile but don't handle dynamic changes without restarting the workbench.- Since:
- 2.0
- See Also:
 
 
- 
- 
Constructor Details- 
ProvisioningJobCreate a provisioning job with the given name that uses the provided provisioning session for retrieving any services needed.- Parameters:
- name- the name of the job
- session- the session providing the services
 
 
- 
- 
Method Details- 
getSessionReturn the provisioning session that is used by the receiver when retrieving necessary provisioning services.- Returns:
- the session
- See Also:
 
- 
setAdditionalProgressMonitor
- 
runExecutes this job. Returns the result of the execution. This method is overridden to look for a wrapped progress monitor for reporting progress.- Specified by:
- runin class- Job
- Parameters:
- monitor- the monitor to be used for reporting progress and responding to cancelation. The monitor is never- null
- Returns:
- resulting status of the run. The result must not be null
- See Also:
- Restriction:
- This method is not intended to be referenced by clients.
 
- 
runModalPerform the specific work involved in running this job in the current thread. This method can be called directly by clients, or in the course of running the job in the background.- Parameters:
- monitor- the progress monitor to use for the operation
- Returns:
- a status indicating the result of the operation.
 
- 
getRestartPolicypublic int getRestartPolicy()Return the restart policy that is appropriate for this job.- Returns:
- a constant indicating the restart policy
- See Also:
 
- 
getErrorStatusReturn an error status that can be used to report the specified exception.- Parameters:
- message- the message that should be used in the status
- e- the exception to be reported
- Returns:
- a status that can be used to describe the exception
 
 
-