org.lobobrowser.util
Class JoinableTask

java.lang.Object
  extended by org.lobobrowser.util.JoinableTask
All Implemented Interfaces:
java.lang.Runnable, SimpleThreadPoolTask

public abstract class JoinableTask
extends java.lang.Object
implements SimpleThreadPoolTask

A task that can be used in a thread or thread pool. The caller can wait for the task to finish by joining it.


Constructor Summary
JoinableTask()
           
 
Method Summary
 void cancel()
           
protected abstract  void execute()
           
 void forceDone()
           
 void join()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinableTask

public JoinableTask()
Method Detail

run

public final void run()
Specified by:
run in interface java.lang.Runnable

forceDone

public final void forceDone()

join

public void join()
          throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

cancel

public void cancel()
Specified by:
cancel in interface SimpleThreadPoolTask

execute

protected abstract void execute()