net.sourceforge.java.util.jobs
Class JobThread

java.lang.Object
  extended byjava.lang.Thread
      extended bynet.sourceforge.java.util.jobs.JobThread
All Implemented Interfaces:
Runnable

public class JobThread
extends Thread

Thread to execute an IJob reporting its progress using an IProgressMonitor.

Author:
Sebastian Machhausen

Field Summary
private  IJob job
           The IJob to be executed in the JobThread
private  IProgressMonitor monitor
           The IProgressMonitor to report the progress of the IJob to
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JobThread(IJob job, IProgressMonitor monitor)
           Creates a new JobThread that executes the specified IJob and reports the progress of the IJob to the specified IProgressMonitor.
 
Method Summary
 void run()
           Runs this JobThread by invoking the IRunnableWithProgress.run(IProgressMonitor) method of the IJob.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

job

private IJob job

The IJob to be executed in the JobThread


monitor

private IProgressMonitor monitor

The IProgressMonitor to report the progress of the IJob to

Constructor Detail

JobThread

public JobThread(IJob job,
                 IProgressMonitor monitor)

Creates a new JobThread that executes the specified IJob and reports the progress of the IJob to the specified IProgressMonitor.

Parameters:
job - the IJob to be executed in this JobThread
monitor - the IProgressMonitor to use for reporting progress of the IJob
Method Detail

run

public void run()

Runs this JobThread by invoking the IRunnableWithProgress.run(IProgressMonitor) method of the IJob.

See Also:
IRunnableWithProgress.run(IProgressMonitor)