Interface LdapResultHandler<S>

  • Type Parameters:
    S - The type of result handled by this result handler.
    All Superinterfaces:
    ExceptionHandler<LdapException>, ResultHandler<S>

    public interface LdapResultHandler<S>
    extends ResultHandler<S>, ExceptionHandler<LdapException>
    A completion handler for consuming the result of an asynchronous operation or connection attempts.

    A result completion handler may be specified when performing asynchronous operations using a Connection object or when connecting asynchronously to a remote Directory Server using an ConnectionFactory. The handleResult(S) method is invoked when the operation or connection attempt completes successfully. The handleException(LdapException) method is invoked if the operation or connection attempt fails.

    Implementations of these methods should complete in a timely manner so as to avoid keeping the invoking thread from dispatching to other completion handlers.

    • Method Detail

      • handleException

        void handleException​(LdapException exception)
        Invoked when the asynchronous operation has failed.
        Specified by:
        handleException in interface ExceptionHandler<S>
        Parameters:
        exception - The error result exception indicating why the asynchronous operation has failed.
      • handleResult

        void handleResult​(S result)
        Invoked when the asynchronous operation has completed successfully.
        Specified by:
        handleResult in interface ResultHandler<S>
        Parameters:
        result - The result of the asynchronous operation.