|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.webtest.framework.core.AbstractPollingQuery com.atlassian.jira.webtest.framework.core.query.AbstractTimedQuery<T> com.atlassian.jira.webtest.framework.core.query.AbstractConditionBasedQuery<T>
T
- type of the query result@NotThreadSafe public abstract class AbstractConditionBasedQuery<T>
A TimedQuery
that will only return if a given TimedCondition
is met.
Field Summary |
---|
Fields inherited from class com.atlassian.jira.webtest.framework.core.AbstractPollingQuery |
---|
defaultTimeout, interval |
Constructor Summary | |
---|---|
protected |
AbstractConditionBasedQuery(TimedCondition condition)
By default, this query will return null , if the underlying condition is not met before
timeout. |
protected |
AbstractConditionBasedQuery(TimedCondition condition,
ExpirationHandler expirationHandler)
Use timeout configuration from the underlying condition. |
protected |
AbstractConditionBasedQuery(TimedCondition condition,
long defTimeout,
long interval,
ExpirationHandler expirationHandler)
|
Method Summary | |
---|---|
TimedCondition |
condition()
|
protected T |
currentValue()
Current evaluation of the query. |
protected abstract T |
evaluateNow()
Hook for subclasses, semantics are basically the same as currentValue() . |
protected boolean |
shouldReturn(T currentEval)
If the current evaluated query value should be returned. |
protected T |
substituteValue()
A 'null' value for given context that will be returned by currentValue() in case the underlying condition
evaluates to false |
Methods inherited from class com.atlassian.jira.webtest.framework.core.query.AbstractTimedQuery |
---|
by, by, byDefaultTimeout, clock, expirationHandler, now, resetLastRun, toString |
Methods inherited from class com.atlassian.jira.webtest.framework.core.AbstractPollingQuery |
---|
defaultTimeout, interval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.webtest.framework.core.PollingQuery |
---|
defaultTimeout, interval |
Constructor Detail |
---|
protected AbstractConditionBasedQuery(TimedCondition condition, long defTimeout, long interval, ExpirationHandler expirationHandler)
protected AbstractConditionBasedQuery(TimedCondition condition, ExpirationHandler expirationHandler)
condition
- underlying conditionexpirationHandler
- expiration handlerprotected AbstractConditionBasedQuery(TimedCondition condition)
null
, if the underlying condition is not met before
timeout.
condition
- underlying conditonMethod Detail |
---|
protected final boolean shouldReturn(T currentEval)
AbstractTimedQuery
shouldReturn
in class AbstractTimedQuery<T>
currentEval
- current query evaluation
expires
true
, if the current query evaluation should be returned as a result of this timed queryprotected final T currentValue()
AbstractTimedQuery
currentValue
in class AbstractTimedQuery<T>
protected abstract T evaluateNow()
currentValue()
.
AbstractTimedQuery.currentValue()
protected T substituteValue()
A 'null' value for given context that will be returned by
Subclasses may override this method to provide non-null empty values, depending on the query context
currentValue()
in case the underlying condition
evaluates to false
.
public final TimedCondition condition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |