public class WaitFor extends ConditionBase
parallel
task to
synchronize the execution of tests with server startup.
The following attributes can be specified on a waitfor task:
processSuccess
and processTimeout
Modifier and Type | Class and Description |
---|---|
static class |
WaitFor.Unit
The enumeration of units:
millisecond, second, minute, hour, day, week
|
description, location, project
Constructor and Description |
---|
WaitFor()
Constructor, names this task "waitfor".
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Check repeatedly for the specified conditions until they become
true or the timeout expires.
|
protected void |
processSuccess()
Actions to be taken on a successful waitfor.
|
protected void |
processTimeout()
Actions to be taken on an unsuccessful wait.
|
void |
setCheckEvery(long time)
Set the time between each check
|
void |
setCheckEveryUnit(WaitFor.Unit unit)
Set the check every time unit
|
void |
setMaxWait(long time)
Set the maximum length of time to wait.
|
void |
setMaxWaitUnit(WaitFor.Unit unit)
Set the max wait time unit
|
void |
setTimeoutProperty(java.lang.String p)
Name the property to set after a timeout.
|
add, addAnd, addAvailable, addChecksum, addContains, addEquals, addFilesMatch, addHttp, addIsFalse, addIsFileSelected, addIsReference, addIsSet, addIsTrue, addNot, addOr, addOs, addSocket, addUptodate, countConditions, createDynamicElement, getConditions, getTaskName, setTaskName
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public void setMaxWait(long time)
time
- a long
valuepublic void setMaxWaitUnit(WaitFor.Unit unit)
unit
- an enumerated Unit
valuepublic void setCheckEvery(long time)
time
- a long
valuepublic void setCheckEveryUnit(WaitFor.Unit unit)
unit
- an enumerated Unit
valuepublic void setTimeoutProperty(java.lang.String p)
p
- the property namepublic void execute() throws BuildException
BuildException
- on errorprotected void processSuccess()
protected void processTimeout()