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 |
|---|---|
| public static class | WaitFor.Unit
The enumeration of units: millisecond, second, minute, hour, day, week |
| Modifier and Type | Field and Description |
|---|---|
| private long | checkEvery
check time in the current unit |
| private long | |
| public static final long | DEFAULT_CHECK_MILLIS
default check time |
| public static final long | DEFAULT_MAX_WAIT_MILLIS
default wait time |
| private long | maxWait
default max wait time in the current unit |
| private long | |
| public static final long | ONE_DAY
a day in milliseconds |
| public static final long | ONE_HOUR
an hour in milliseconds |
| public static final long | ONE_MILLISECOND
a millisecond |
| public static final long | ONE_MINUTE
a minute in milliseconds |
| public static final long | ONE_SECOND
a second in milliseconds |
| public static final long | ONE_WEEK
a week in milliseconds |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: how long to wait between checksGet the check wait time, in milliseconds. |
| public long | Returns: how long to wait before timing outGet the maximum wait time, in milliseconds. |
| public void | execute()
Check repeatedly for the specified conditions until they become true or the timeout expires. |
| protected void | |
| protected void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| checkEvery | back to summary |
|---|---|
| private long checkEvery check time in the current unit | |
| checkEveryMultiplier | back to summary |
|---|---|
| private long checkEveryMultiplier | |
| DEFAULT_CHECK_MILLIS | back to summary |
|---|---|
| public static final long DEFAULT_CHECK_MILLIS default check time | |
| DEFAULT_MAX_WAIT_MILLIS | back to summary |
|---|---|
| public static final long DEFAULT_MAX_WAIT_MILLIS default wait time | |
| maxWait | back to summary |
|---|---|
| private long maxWait default max wait time in the current unit | |
| maxWaitMultiplier | back to summary |
|---|---|
| private long maxWaitMultiplier | |
| ONE_DAY | back to summary |
|---|---|
| public static final long ONE_DAY a day in milliseconds | |
| ONE_HOUR | back to summary |
|---|---|
| public static final long ONE_HOUR an hour in milliseconds | |
| ONE_MILLISECOND | back to summary |
|---|---|
| public static final long ONE_MILLISECOND a millisecond | |
| ONE_MINUTE | back to summary |
|---|---|
| public static final long ONE_MINUTE a minute in milliseconds | |
| ONE_SECOND | back to summary |
|---|---|
| public static final long ONE_SECOND a second in milliseconds | |
| ONE_WEEK | back to summary |
|---|---|
| public static final long ONE_WEEK a week in milliseconds | |
| timeoutProperty | back to summary |
|---|---|
| private String timeoutProperty | |
| WaitFor | back to summary |
|---|---|
| public WaitFor() Constructor, names this task "waitfor". | |
| WaitFor | back to summary |
|---|---|
| public WaitFor(String taskName) Constructor that takes the name of the task in the task name.
| |
| calculateCheckEveryMillis | back to summary |
|---|---|
| public long calculateCheckEveryMillis() Get the check wait time, in milliseconds.
| |
| calculateMaxWaitMillis | back to summary |
|---|---|
| public long calculateMaxWaitMillis() Get the maximum wait time, in milliseconds.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Check repeatedly for the specified conditions until they become true or the timeout expires.
| |
| processSuccess | back to summary |
|---|---|
| protected void processSuccess() Actions to be taken on a successful waitfor. This is an override point. The base implementation does nothing.
| |
| processTimeout | back to summary |
|---|---|
| protected void processTimeout() Actions to be taken on an unsuccessful wait. This is an override point. It is where the timeout processing takes place. The base implementation sets the timeoutproperty if there was a timeout and the property was defined.
| |
| setCheckEvery | back to summary |
|---|---|
| public void setCheckEvery(long time) Set the time between each check
| |
| setCheckEveryUnit | back to summary |
|---|---|
| public void setCheckEveryUnit(WaitFor. Set the check every time unit | |
| setMaxWait | back to summary |
|---|---|
| public void setMaxWait(long time) Set the maximum length of time to wait.
| |
| setMaxWaitUnit | back to summary |
|---|---|
| public void setMaxWaitUnit(WaitFor. Set the max wait time unit | |
| setTimeoutProperty | back to summary |
|---|---|
| public void setTimeoutProperty(String p) Name the property to set after a timeout.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DAY
day string |
| public static final String | HOUR
hour string |
| public static final String | MILLISECOND
millisecond string |
| public static final String | MINUTE
minute string |
| public static final String | SECOND
second string |
| private Map | |
| private static final String[] | |
| public static final String | WEEK
week string |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: a multiplier (a long value)Convert the value to a multiplier (millisecond to unit). |
| public String[] | getValues()
Implements abstract org. |
| DAY | back to summary |
|---|---|
| public static final String DAY day string | |
| HOUR | back to summary |
|---|---|
| public static final String HOUR hour string | |
| MILLISECOND | back to summary |
|---|---|
| public static final String MILLISECOND millisecond string | |
| MINUTE | back to summary |
|---|---|
| public static final String MINUTE minute string | |
| SECOND | back to summary |
|---|---|
| public static final String SECOND second string | |
| timeTable | back to summary |
|---|---|
| private Map<String, Long> timeTable | |
| UNITS | back to summary |
|---|---|
| private static final String[] UNITS | |
| WEEK | back to summary |
|---|---|
| public static final String WEEK week string | |
| Unit | back to summary |
|---|---|
| public Unit() Constructor the Unit enumerated type. | |
| getMultiplier | back to summary |
|---|---|
| public long getMultiplier() Convert the value to a multiplier (millisecond to unit).
| |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. Doc from org. This is the only method a subclass needs to implement.
| |