Interface LdapConnectionFactory

    • Method Detail

      • bindConnection

        LdapConnection bindConnection​(LdapConnection connection)
                               throws LdapException
        Issues a bind request on the supplied connection using the name and credentials from the LdapConnectionConfg supplied to the constructor. Returns the connection supplied for chaining.
        Parameters:
        connection - The connection to bind with the configuration credentials.
        Returns:
        The connection supplied.
        Throws:
        LdapException - If the bind fails.
      • configureConnection

        LdapConnection configureConnection​(LdapConnection connection)
        Applies the following configuration settings from the LdapConnectionConfig to the supplied connection:
        • timeOut
        • binaryAttributeDetector
        This method is called by newLdapConnection, so there is no need to call this on a newly created connection. This should be used for pooling where the returned connection could have been modified by the borrower in order to ensure the next borrower gets a correctly configured connection. Returns the supplied connection for chaining.
        Parameters:
        connection - The connection to configure
        Returns:
        The supplied connection.
      • getLdapApiService

        LdapApiService getLdapApiService()
        Returns the LdapApiService instance used by this factory.
        Returns:
        The LdapApiService instance used by this factory
      • newLdapConnection

        LdapConnection newLdapConnection()
                                  throws LdapException
        Returns a newly created, configured, and authenticated connection. This method should be used by a connection pool to manufacture the pooled instances.
        Returns:
        A newly created, configured, and authenticated LdapConnection.
        Throws:
        LdapException - If the new connection couldn't be established
      • newUnboundLdapConnection

        LdapConnection newUnboundLdapConnection()
        Returns a newly created connection, that has not been bound (bind) that otherwise respects LdapConnectionConfig supplied to the constructor. This is useful for authentication purposes where the consumer will use a bind operation.
        Returns:
        A newly created and configured LdapConnection.