public abstract class ProvisioningJob extends Job
Modifier and Type | Field and Description |
---|---|
static int |
RESTART_NONE
Constant which indicates that the job does not require a restart
upon completion.
|
static int |
RESTART_ONLY
Constant which indicates that the job requires the user to restart
in order to pick up the changes performed by the job.
|
static int |
RESTART_OR_APPLY
Constant 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.
|
Constructor and Description |
---|
ProvisioningJob(String name,
ProvisioningSession session)
Create a provisioning job with the given name that uses the
provided provisioning session for retrieving any services
needed.
|
Modifier and Type | Method and Description |
---|---|
protected IStatus |
getErrorStatus(String message,
ProvisionException e)
Return an error status that can be used to report the specified exception.
|
int |
getRestartPolicy()
Return the restart policy that is appropriate for this job.
|
protected ProvisioningSession |
getSession()
Return the provisioning session that is used by the receiver
when retrieving necessary provisioning services.
|
IStatus |
run(IProgressMonitor monitor)
Executes this job.
|
abstract IStatus |
runModal(IProgressMonitor monitor)
Perform the specific work involved in running this job in
the current thread.
|
void |
setAdditionalProgressMonitor(IProgressMonitor monitor) |
addJobChangeListener, belongsTo, cancel, canceling, create, 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, yieldRule
getAdapter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAdapter
public static final int RESTART_NONE
public static final int RESTART_OR_APPLY
public static final int RESTART_ONLY
public ProvisioningJob(String name, ProvisioningSession session)
name
- the name of the jobsession
- the session providing the servicesprotected ProvisioningSession getSession()
ProvisioningSession
public void setAdditionalProgressMonitor(IProgressMonitor monitor)
public final IStatus run(IProgressMonitor monitor)
run
in class Job
monitor
- the monitor to be used for reporting progress and
responding to cancelation. The monitor is never null
null
Job.run(org.eclipse.core.runtime.IProgressMonitor)
public abstract IStatus runModal(IProgressMonitor monitor)
monitor
- the progress monitor to use for the operationpublic int getRestartPolicy()
RESTART_NONE
,
RESTART_ONLY
,
RESTART_OR_APPLY
protected IStatus getErrorStatus(String message, ProvisionException e)
message
- the message that should be used in the statuse
- the exception to be reported
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.