Package org.awaitility.core
Class ConditionAwaiter
- java.lang.Object
-
- org.awaitility.core.ConditionAwaiter
-
- All Implemented Interfaces:
java.lang.Thread.UncaughtExceptionHandler
abstract class ConditionAwaiter extends java.lang.Object implements java.lang.Thread.UncaughtExceptionHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classConditionAwaiter.ConditionPoller
-
Field Summary
Fields Modifier and Type Field Description private ConditionEvaluatorconditionEvaluatorprivate ConditionSettingsconditionSettingsprivate java.util.concurrent.ExecutorServiceexecutorprivate java.util.concurrent.atomic.AtomicReference<java.lang.Throwable>uncaughtThrowable
-
Constructor Summary
Constructors Constructor Description ConditionAwaiter(ConditionEvaluator conditionEvaluator, ConditionSettings conditionSettings)Constructor for ConditionAwaiter.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> voidawait(ConditionEvaluationHandler<T> conditionEvaluationHandler)await.(package private) static java.time.DurationcalculateConditionEvaluationDuration(java.time.Duration pollDelay, long pollingStarted, long firstSucceedSinceStarted, java.time.Duration minWaitTime, java.time.Duration holdPredicateWaitTime)private static java.lang.Stringdecapitalize(java.lang.String str)private voidexecuteFailFastConditionIfDefined()protected abstract java.lang.StringgetTimeoutMessage()getTimeoutMessage.voiduncaughtException(java.lang.Thread thread, java.lang.Throwable throwable)
-
-
-
Field Detail
-
executor
private final java.util.concurrent.ExecutorService executor
-
conditionEvaluator
private final ConditionEvaluator conditionEvaluator
-
uncaughtThrowable
private final java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> uncaughtThrowable
-
conditionSettings
private final ConditionSettings conditionSettings
-
-
Constructor Detail
-
ConditionAwaiter
ConditionAwaiter(ConditionEvaluator conditionEvaluator, ConditionSettings conditionSettings)
Constructor for ConditionAwaiter.
- Parameters:
conditionEvaluator- aConditionEvaluatorobject.conditionSettings- aConditionSettingsobject.
-
-
Method Detail
-
await
public <T> void await(ConditionEvaluationHandler<T> conditionEvaluationHandler)
await.
- Parameters:
conditionEvaluationHandler- The conditionEvaluationHandler
-
executeFailFastConditionIfDefined
private void executeFailFastConditionIfDefined() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
decapitalize
private static java.lang.String decapitalize(java.lang.String str)
-
getTimeoutMessage
protected abstract java.lang.String getTimeoutMessage()
getTimeoutMessage.
- Returns:
- a
Stringobject.
-
uncaughtException
public void uncaughtException(java.lang.Thread thread, java.lang.Throwable throwable)- Specified by:
uncaughtExceptionin interfacejava.lang.Thread.UncaughtExceptionHandler
-
calculateConditionEvaluationDuration
static java.time.Duration calculateConditionEvaluationDuration(java.time.Duration pollDelay, long pollingStarted, long firstSucceedSinceStarted, java.time.Duration minWaitTime, java.time.Duration holdPredicateWaitTime)
-
-