Package org.ldaptive

Class DefaultConnectionFactory

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
        Logger for this class.
    • Constructor Detail

      • DefaultConnectionFactory

        public DefaultConnectionFactory()
        Default constructor.
      • DefaultConnectionFactory

        public DefaultConnectionFactory​(Transport t)
        Creates a new default connection factory. Be sure to invoke close() if the supplied transport has resources to cleanup.
        Parameters:
        t - transport
      • DefaultConnectionFactory

        public DefaultConnectionFactory​(java.lang.String ldapUrl)
        Creates a new default connection factory.
        Parameters:
        ldapUrl - to connect to
      • DefaultConnectionFactory

        public DefaultConnectionFactory​(java.lang.String ldapUrl,
                                        Transport t)
        Creates a new default connection factory. Be sure to invoke close() if the supplied transport has resources to cleanup.
        Parameters:
        ldapUrl - to connect to
        t - transport
      • DefaultConnectionFactory

        public DefaultConnectionFactory​(ConnectionConfig cc)
        Creates a new default connection factory.
        Parameters:
        cc - connection configuration
      • DefaultConnectionFactory

        public DefaultConnectionFactory​(ConnectionConfig cc,
                                        Transport t)
        Creates a new default connection factory. Be sure to invoke close() if the supplied transport has resources to cleanup.
        Parameters:
        cc - connection configuration
        t - transport
    • Method Detail

      • setConnectionConfig

        public void setConnectionConfig​(ConnectionConfig cc)
        Sets the connection config. Once invoked the supplied connection config is made immutable. See AbstractConfig.makeImmutable().
        Parameters:
        cc - connection config
      • getTransport

        public Transport getTransport()
        Returns the ldap transport.
        Returns:
        ldap transport
      • getConnection

        public Connection getConnection()
        Creates a new connection. Connections returned from this method must be opened before they can perform ldap operations.
        Specified by:
        getConnection in interface ConnectionFactory
        Returns:
        connection
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object