|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectgeb.waiting.Wait
class Wait extends Object
Represents a particular configuration of waiting, but does not encompass what is to be waited on.
Generally not used by user code, but used internally by Configuration and WaitingSupport.
Field Summary | |
---|---|
static Double |
DEFAULT_RETRY_INTERVAL
100 milliseconds |
static Double |
DEFAULT_TIMEOUT
5 seconds |
Property Summary | |
---|---|
Double |
retryInterval
How many seconds to wait before trying something again while waiting. |
Double |
timeout
The maximum amount of seconds that something can be waited on. |
Constructor Summary | |
Wait(Double timeout = DEFAULT_TIMEOUT, Double retryInterval = DEFAULT_RETRY_INTERVAL)
|
Method Summary | |
---|---|
boolean
|
equals(def other)
|
int
|
hashCode()
|
void
|
sleepForRetryInterval()
Blocks the caller for the retryInterval |
String
|
toString()
|
def
|
waitFor(Closure block)
Invokes the given block every retryInterval seconds until it returns a true value according to the Groovy Truth. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
public static final Double DEFAULT_RETRY_INTERVAL
public static final Double DEFAULT_TIMEOUT
Property Detail |
---|
final Double retryInterval
final Double timeout
Constructor Detail |
---|
Wait(Double timeout = DEFAULT_TIMEOUT, Double retryInterval = DEFAULT_RETRY_INTERVAL)
Method Detail |
---|
boolean equals(def other)
int hashCode()
void sleepForRetryInterval()
String toString()
def waitFor(Closure block)
If block throws an exception, it is treated as a failure and the block will be tried again after the retryInterval has expired. If the last invocation of block throws an exception it will be the cause of the WaitTimeoutException that will be thrown.
Groovy API Documentation for geb-core 0.6.0 - Licensed under the Apache License, Version 2.0 - http://www.gebish.org