org.apache.tools.ant.util
public class WorkerAnt extends Thread
Since: Ant 1.8
Field Summary | |
---|---|
static String | ERROR_NO_TASK
Error message if invoked with no task |
Constructor Summary | |
---|---|
WorkerAnt(Task task, Object notify)
Create the worker.
| |
WorkerAnt(Task task)
Create the worker, using the worker as the notification point.
|
Method Summary | |
---|---|
BuildException | getBuildException()
Get any build exception.
|
Throwable | getException()
Get whatever was thrown, which may or may not be a buildException.
|
Task | getTask()
Get the task |
boolean | isFinished()
Query the task/thread for being finished.
|
void | rethrowAnyBuildException()
Raise an exception if one was caught
|
void | run()
Run the task, which is skipped if null.
|
void | waitUntilFinished(long timeout)
Block on the notify object and so wait until the thread is finished. |
Parameters: task the task notify what to notify
Parameters: task the task
Returns: the exception or null
Returns: the exception.
Returns: the task
Returns: true if the task is finished.
Throws: BuildException if one has been picked up
Parameters: timeout timeout in milliseconds
Throws: InterruptedException if the execution was interrupted