| | |
| | | import org.opends.admin.ads.ADSContext; |
| | | import org.opends.admin.ads.ServerDescriptor; |
| | | import org.opends.admin.ads.TopologyCacheException; |
| | | import org.opends.admin.ads.TopologyCacheFilter; |
| | | import org.opends.admin.ads.ADSContext.ServerProperty; |
| | | |
| | | /** |
| | |
| | | private String dn; |
| | | private String pwd; |
| | | private LinkedHashSet<PreferredConnection> preferredLDAPURLs; |
| | | private TopologyCacheFilter filter; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ServerLoader.class.getName()); |
| | |
| | | * @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. |
| | | * @param filter the topology cache filter to be used. This can be used not |
| | | * to retrieve all the information. |
| | | */ |
| | | public ServerLoader(Map<ServerProperty,Object> serverProperties, |
| | | String dn, String pwd, ApplicationTrustManager trustManager, |
| | | LinkedHashSet<PreferredConnection> preferredLDAPURLs) |
| | | LinkedHashSet<PreferredConnection> preferredLDAPURLs, |
| | | TopologyCacheFilter filter) |
| | | { |
| | | this.serverProperties = serverProperties; |
| | | this.dn = dn; |
| | |
| | | this.trustManager = trustManager; |
| | | this.preferredLDAPURLs = |
| | | new LinkedHashSet<PreferredConnection>(preferredLDAPURLs); |
| | | this.filter = filter; |
| | | } |
| | | |
| | | /** |
| | |
| | | try |
| | | { |
| | | ctx = createContext(); |
| | | serverDescriptor = ServerDescriptor.createStandalone(ctx); |
| | | serverDescriptor = ServerDescriptor.createStandalone(ctx, filter); |
| | | serverDescriptor.setAdsProperties(serverProperties); |
| | | } |
| | | catch (NoPermissionException npe) |