|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An IJob represents a high level abstraction of a
Thread. IJobs are executed in a standardized
execution environment in shape of the
JobManager whereas an
IJob contains common auxiliary meta data which provides
detailed information on its execution status.
| Field Summary | |
static int |
HIGH_PRIORITY
The highest priority for an IJob |
static int |
LOW_PRIORITY
The lowest priority for an IJob |
static int |
NORM_PRIORITY
The default priority for an IJob |
| Method Summary | |
void |
cancel()
Cancels an IJob.
|
void |
done()
This method has to be called instantly after an IJob is
done.
|
Exception |
getException()
Gets a potential Exception that may occured while
executing an IJob.
|
JobManager |
getJobManager()
Gets the JobManager that is responsible for the management
and scheduling of the IJob.
|
String |
getName()
Gets the human readable name of an IJob.
|
int |
getPriority()
Gets the priority of an IJob.
|
JobStatus |
getStatus()
Gets the status of an IJob.
|
Thread |
getThread()
Gets the Thread that the IJob runs in.
|
boolean |
isCanceled()
Gets the cancellation status of an IJob.
|
void |
join()
Joins the IJob running in the set Thread as
returned by the getThread() method.
|
void |
setException(Exception cause)
Sets a potential Exception that may occured while
executing an IJob.
|
void |
setJobManager(JobManager manager)
Sets the JobManager that is responsible for the management
and scheduling of the IJob.
|
void |
setName(String name)
Sets a human readable name for an IJob.
|
void |
setPriority(int priority)
Sets the priority of an IJob.
|
void |
setThread(Thread thread)
Sets the Thread that the IJob runs in.
|
void |
start()
Starts the IJob in the set Thread as
returned by the getThread() method.
|
void |
started()
This method has to be called instantly after an IJob has
been started.
|
void |
statusChanged()
This method can be called if the JobStatus of an
IJob changed.
|
| Methods inherited from interface org.eclipse.jface.operation.IRunnableWithProgress |
run |
| Field Detail |
public static final int LOW_PRIORITY
IJob
public static final int NORM_PRIORITY
IJob
public static final int HIGH_PRIORITY
IJob
| Method Detail |
public void setPriority(int priority)
Sets the priority of an IJob.
LOW_PRIORITY for the lowest priority (1)NORM_PRIORITY for default priority (5)HIGH_PRIORITY for the highest priority (10)LOW_PRIORITY and
HIGH_PRIORITY. Priorites beyons this interval will be rejected
and don't change the current priority.
priority - the priority to set for the IJobpublic int getPriority()
Gets the priority of an IJob.
LOW_PRIORITY for the lowest priority (1)NORM_PRIORITY for default priority (5)HIGH_PRIORITY for the highest priority (10)LOW_PRIORITY and
HIGH_PRIORITY.
IJobpublic void setJobManager(JobManager manager)
Sets the JobManager that is responsible for the management
and scheduling of the IJob.
manager - the JobManager that is responsible for the
management and scheduling of the IJobpublic JobManager getJobManager()
Gets the JobManager that is responsible for the management
and scheduling of the IJob.
JobManager that is responsible for the
management and scheduling of the IJobpublic void setThread(Thread thread)
Sets the Thread that the IJob runs in.
thread - the Thread that the IJob runs inpublic Thread getThread()
Gets the Thread that the IJob runs in.
Thread that the IJob runs inpublic void setException(Exception cause)
Sets a potential Exception that may occured while
executing an IJob.
cause - a potential Exception that may occured while
executing an IJob; null if no
Exception occuredpublic Exception getException()
Gets a potential Exception that may occured while
executing an IJob.
Exception that may occured while
executing an IJob; null if no
Exception occuredpublic void setName(String name)
Sets a human readable name for an IJob.
name - a human readable name for an IJobpublic String getName()
Gets the human readable name of an IJob.
IJobpublic JobStatus getStatus()
Gets the status of an IJob.
JobStatus object representing the
status of the IJobpublic void start()
Starts the IJob in the set Thread as
returned by the getThread() method.
If no Thread is set this method does nothing.
public void started()
This method has to be called instantly after an IJob has
been started.
public void join()
throws InterruptedException
Joins the IJob running in the set Thread as
returned by the getThread() method.
If no Thread is set this method does nothing.
InterruptedExceptionpublic void done()
This method has to be called instantly after an IJob is
done.
public void statusChanged()
This method can be called if the JobStatus of an
IJob changed.
public void cancel()
Cancels an IJob.
public boolean isCanceled()
Gets the cancellation status of an IJob.
true if the IJob has been
canceled; false otherwise
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||