code: public static DefaultConnectionFactory newConnectionFactory(final AbstractLdapProperties l) {
          final ConnectionConfig cc = newConnectionConfig(l);
          final DefaultConnectionFactory bindCf = new DefaultConnectionFactory(cc);
          if (l.getProviderClass() != null) {
              try {
                  final Constructor<? extends Provider> constructor = CommonHelper.getConstructor(l.getProviderClass());
                  bindCf.setProvider(constructor.newInstance());
              } catch (final Exception e) {
                  LOGGER.error(e.getMessage(), e);
              }
          }
          return bindCf;
      }
docs: New connection factory connection factory.
  
  @param l the l
  @return the connection factory