Package org.ldaptive

Interface ConnectionValidator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.function.Supplier<java.lang.Boolean> applyAsync​(Connection conn)
      Provides an asynchronous implementation of Function.apply(Object).
      void applyAsync​(Connection conn, java.util.function.Consumer<java.lang.Boolean> function)
      Provides an asynchronous implementation of Function.apply(Object).
      java.time.Duration getValidatePeriod()
      Returns the interval at which the validation task will be executed.
      java.time.Duration getValidateTimeout()
      Returns the time at which a validate operation should be abandoned.
      • Methods inherited from interface java.util.function.Function

        andThen, apply, compose
    • Method Detail

      • applyAsync

        void applyAsync​(Connection conn,
                        java.util.function.Consumer<java.lang.Boolean> function)
        Provides an asynchronous implementation of Function.apply(Object). The supplied consumer will be invoked with the validation result. getValidateTimeout() must be enforced by the caller.
        Parameters:
        conn - to validate
        function - to consume the validation result
      • applyAsync

        java.util.function.Supplier<java.lang.Boolean> applyAsync​(Connection conn)
        Provides an asynchronous implementation of Function.apply(Object). The returned supplier will block until a validation result is received respecting getValidateTimeout().
        Parameters:
        conn - to validate
        Returns:
        supplier to retrieve the validation result
      • getValidatePeriod

        java.time.Duration getValidatePeriod()
        Returns the interval at which the validation task will be executed.
        Returns:
        validation period
      • getValidateTimeout

        java.time.Duration getValidateTimeout()
        Returns the time at which a validate operation should be abandoned.
        Returns:
        validation timeout