org.apache.tools.ant.taskdefs

Class WaitFor

public class WaitFor extends ConditionBase

Wait for an external event to occur. Wait for an external process to start or to complete some task. This is useful with the parallel task to synchronize the execution of tests with server startup. The following attributes can be specified on a waitfor task: The maxwaitunit and checkeveryunit are allowed to have the following values: millisecond, second, minute, hour, day and week. The default is millisecond.

Since: Ant 1.5

UNKNOWN: category="control"

Nested Class Summary
static classWaitFor.Unit
The enumeration of units: millisecond, second, minute, hour, day, week
Method Summary
voidexecute()
Check repeatedly for the specified conditions until they become true or the timeout expires.
voidsetCheckEvery(long time)
Set the time between each check
voidsetCheckEveryUnit(WaitFor.Unit unit)
Set the check every time unit
voidsetMaxWait(long time)
Set the maximum length of time to wait
voidsetMaxWaitUnit(WaitFor.Unit unit)
Set the max wait time unit
voidsetTimeoutProperty(String p)
Name the property to set after a timeout.

Method Detail

execute

public void execute()
Check repeatedly for the specified conditions until they become true or the timeout expires.

setCheckEvery

public void setCheckEvery(long time)
Set the time between each check

setCheckEveryUnit

public void setCheckEveryUnit(WaitFor.Unit unit)
Set the check every time unit

setMaxWait

public void setMaxWait(long time)
Set the maximum length of time to wait

setMaxWaitUnit

public void setMaxWaitUnit(WaitFor.Unit unit)
Set the max wait time unit

setTimeoutProperty

public void setTimeoutProperty(String p)
Name the property to set after a timeout.
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.