mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ludovicp
27.10.2010 03fe0954e42abf00746b8efa4c79ee74cf514427
opends/src/ads/org/opends/admin/ads/util/ServerLoader.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 */
package org.opends.admin.ads.util;
@@ -60,6 +60,7 @@
  private TopologyCacheException lastException;
  private ServerDescriptor serverDescriptor;
  private ApplicationTrustManager trustManager;
  private int timeout;
  private String dn;
  private String pwd;
  private LinkedHashSet<PreferredConnection> preferredLDAPURLs;
@@ -76,6 +77,8 @@
   * @param pwd the password that we must use to bind to the server.
   * @param trustManager the ApplicationTrustManager to be used when we try
   * to connect to the server.
   * @param timeout the timeout to establish the connection in milliseconds.
   * Use {@code 0} to express no timeout.
   * @param preferredLDAPURLs the list of preferred LDAP URLs that we want
   * to use to connect to the server.  They will be used only if they correspond
   * to the URLs that we found in the the server properties.
@@ -84,6 +87,7 @@
   */
  public ServerLoader(Map<ServerProperty,Object> serverProperties,
      String dn, String pwd, ApplicationTrustManager trustManager,
      int timeout,
      LinkedHashSet<PreferredConnection> preferredLDAPURLs,
      TopologyCacheFilter filter)
  {
@@ -91,6 +95,7 @@
    this.dn = dn;
    this.pwd = pwd;
    this.trustManager = trustManager;
    this.timeout = timeout;
    this.preferredLDAPURLs =
      new LinkedHashSet<PreferredConnection>(preferredLDAPURLs);
    this.filter = filter;
@@ -276,17 +281,17 @@
        {
        case LDAPS:
          ctx = ConnectionUtils.createLdapsContext(lastLdapUrl, dn, pwd,
              ConnectionUtils.getDefaultLDAPTimeout(), null, trustManager,
              timeout, null, trustManager,
              null);
          break;
        case START_TLS:
          ctx = ConnectionUtils.createStartTLSContext(lastLdapUrl, dn, pwd,
              ConnectionUtils.getDefaultLDAPTimeout(), null, trustManager,
              timeout, null, trustManager,
              null, null);
          break;
        default:
          ctx = ConnectionUtils.createLdapContext(lastLdapUrl, dn, pwd,
              ConnectionUtils.getDefaultLDAPTimeout(), null);
              timeout, null);
        }
      }
    }