Package org.ldaptive
Interface ConnectionValidator
- All Superinterfaces:
Function<Connection,
Boolean>
- All Known Implementing Classes:
AbstractConnectionValidator
,CompareConnectionValidator
,SearchConnectionValidator
Provides an interface for defining connection validation.
-
Method Summary
Modifier and TypeMethodDescriptionapplyAsync
(Connection conn) Provides an asynchronous implementation ofFunction.apply(Object)
.void
applyAsync
(Connection conn, Consumer<Boolean> function) Provides an asynchronous implementation ofFunction.apply(Object)
.Returns the interval at which the validation task will be executed.Returns the time at which a validate operation should be abandoned.
-
Method Details
-
applyAsync
Provides an asynchronous implementation ofFunction.apply(Object)
. The supplied consumer will be invoked with the validation result.getValidateTimeout()
must be enforced by the caller.- Parameters:
conn
- to validatefunction
- to consume the validation result
-
applyAsync
Provides an asynchronous implementation ofFunction.apply(Object)
. The returned supplier will block until a validation result is received respectinggetValidateTimeout()
.- Parameters:
conn
- to validate- Returns:
- supplier to retrieve the validation result
-
getValidatePeriod
Duration getValidatePeriod()Returns the interval at which the validation task will be executed.- Returns:
- validation period
-
getValidateTimeout
Duration getValidateTimeout()Returns the time at which a validate operation should be abandoned.- Returns:
- validation timeout
-