Package org.awaitility.core
Class ConditionEvaluationHandler<T>
java.lang.Object
org.awaitility.core.ConditionEvaluationHandler<T>
Handler for
Condition implementations that calls ConditionEvaluationListener with condition evaluation result and message.
It also serves as stop watch for elapsed time.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.hamcrest.Matcher<? super T>private final ConditionSettingsprivate final ConditionEvaluationHandler.StopWatch -
Constructor Summary
ConstructorsConstructorDescriptionConditionEvaluationHandler(org.hamcrest.Matcher<? super T> matcher, ConditionSettings settings) -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddoWithListener(Consumer<ConditionEvaluationListener<T>> consumer) private longgetRemainingTimeInMS(long elapsedTimeInMS, Duration maxWaitTime) (package private) voidhandleConditionResultMatch(String matchMessage, T currentConditionValue, Duration pollInterval) (package private) voidhandleConditionResultMismatch(String mismatchMessage, T currentConditionValue, Duration pollInterval) voidhandleIgnoredException(Throwable throwable) voidhandleTimeout(String message, boolean isConditionSatisfied) voidstart()private voidthrowClassCastExceptionBecauseConditionEvaluationListenerCouldNotBeApplied(ClassCastException e, ConditionEvaluationListener listener)
-
Field Details
-
matcher
-
settings
-
watch
-
-
Constructor Details
-
ConditionEvaluationHandler
ConditionEvaluationHandler(org.hamcrest.Matcher<? super T> matcher, ConditionSettings settings)
-
-
Method Details
-
handleConditionResultMismatch
-
handleConditionResultMatch
-
doWithListener
-
getRemainingTimeInMS
-
throwClassCastExceptionBecauseConditionEvaluationListenerCouldNotBeApplied
private void throwClassCastExceptionBecauseConditionEvaluationListenerCouldNotBeApplied(ClassCastException e, ConditionEvaluationListener listener) -
start
public void start() -
handleTimeout
-
handleIgnoredException
-