@NotThreadSafe public class GenericWebDriverTimedQuery<T> extends AbstractTimedQuery<T>
Generic, WebDriver-based implementation of TimedQuery.
It accepts a supplier of the target value and uses it to retrieve current value od the query. The functions are
supposed to throw GenericWebDriverTimedQuery.InvalidValue
to indicate that the current value should not be accepted as valid and returned by the query.
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericWebDriverTimedQuery.InvalidValue |
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.base.Supplier<T> |
valueSupplier |
defaultTimeout, intervalDEFAULT_INTERVAL| Constructor and Description |
|---|
GenericWebDriverTimedQuery(GenericWebDriverTimedQuery<T> origin,
long timeout) |
GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier,
Clock clock,
long defTimeout,
long interval,
ExpirationHandler eh) |
GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier,
long defTimeout) |
GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier,
long defTimeout,
long interval) |
GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier,
long defTimeout,
long interval,
ExpirationHandler eh) |
| Modifier and Type | Method and Description |
|---|---|
protected T |
currentValue()
Current evaluation of the query.
|
protected boolean |
shouldReturn(T currentEval)
If the current evaluated query value should be returned.
|
by, by, byDefaultTimeout, clock, expirationHandler, now, resetLastRun, toStringdefaultTimeout, intervalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultTimeout, intervalprotected final com.google.common.base.Supplier<T> valueSupplier
public GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier, Clock clock, long defTimeout, long interval, ExpirationHandler eh)
public GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier, long defTimeout, long interval, ExpirationHandler eh)
public GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier, long defTimeout, long interval)
public GenericWebDriverTimedQuery(com.google.common.base.Supplier<T> supplier, long defTimeout)
public GenericWebDriverTimedQuery(GenericWebDriverTimedQuery<T> origin, long timeout)
protected final boolean shouldReturn(T currentEval)
AbstractTimedQueryshouldReturn in class AbstractTimedQuery<T>currentEval - current query evaluation
expirestrue, if the current query evaluation should be returned as a result of this timed queryprotected final T currentValue()
AbstractTimedQuerycurrentValue in class AbstractTimedQuery<T>Copyright © 2015 Atlassian. All rights reserved.