Class WaitConditionInvocationHandler<C extends Conditions<?>>
java.lang.Object
io.fluentlenium.core.conditions.wait.WaitConditionInvocationHandler<C>
- Type Parameters:
C- type of conditions
- All Implemented Interfaces:
InvocationHandler
public class WaitConditionInvocationHandler<C extends Conditions<?>>
extends Object
implements InvocationHandler
Invocation handler used to wait for a particular conditions call.
-
Constructor Summary
ConstructorsConstructorDescriptionWaitConditionInvocationHandler(Class<C> conditionClass, FluentWait wait, String context, Supplier<C> conditionSupplier) Creates a new wait condition invocation handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected CapplyNegation(C conditions, boolean ignoreNegation) Apply the current negation to the given conditionprotected CGet the underlying conditions of wait matcher.protected Cconditions(boolean ignoreNot) Get the underlying conditions of wait matcher.protected CBuilds a message builder proxy.protected CmessageBuilder(boolean ignoreNegation) Builds a message builder proxy.Build the final message from default message.protected voidPerform the wait.protected voiduntil(Predicate<FluentControl> present, String message) Perform the wait.protected voiduntil(Predicate<FluentControl> present, Supplier<String> messageSupplier) Perform the wait.
-
Constructor Details
-
WaitConditionInvocationHandler
public WaitConditionInvocationHandler(Class<C> conditionClass, FluentWait wait, String context, Supplier<C> conditionSupplier) Creates a new wait condition invocation handler.- Parameters:
conditionClass- condition classwait- fluent waitcontext- base context of generated message if condition is not verifiedconditionSupplier- supplier of conditions
-
-
Method Details
-
conditions
Get the underlying conditions of wait matcher.- Returns:
- underlying conditions.
-
conditions
Get the underlying conditions of wait matcher.- Parameters:
ignoreNot- true if the negation should be ignored.- Returns:
- underlying conditions.
-
applyNegation
Apply the current negation to the given condition- Parameters:
conditions- conditions.ignoreNegation- true if the negation should be ignored.- Returns:
- conditions with the negation applied.
-
messageBuilder
Builds a message builder proxy.- Returns:
- message builder proxy
-
messageBuilder
Builds a message builder proxy.- Parameters:
ignoreNegation- true if the negation should be ignored.- Returns:
- message builder proxy
-
messageCustomizer
Build the final message from default message.- Returns:
- final message
-
until
Perform the wait.- Parameters:
present- predicate to wait for.message- message to use.
-
until
Perform the wait.- Parameters:
present- predicate to wait for.messageSupplier- default message to use.
-
until
Perform the wait.- Parameters:
condition- condition object to wait formessageBuilder- message builder matching the condition objectconditionFunction- condition function
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-