public final class WorkRequest
extends java.lang.Object
A work request to the thread pool. Allow other threads to wait until the "runnable" is finished. This is basically a concurrent.Future implementation.
Future
,
Task
,
ThreadUtilities
Constructor and Description |
---|
WorkRequest(java.lang.Runnable work) |
Modifier and Type | Method and Description |
---|---|
java.lang.Exception |
getError()
Returns any exception that was caught while running the request.
|
protected java.lang.Runnable |
getRunnable() |
boolean |
isDone() |
protected void |
run() |
void |
waitFor()
Waits until the running job is finished.
|
public void waitFor() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean isDone()
public java.lang.Exception getError()
protected void run()
protected java.lang.Runnable getRunnable()