package javax.naming.ldap; import java.util.List; /** * This class is used by an {@link LdapDnsProvider} to return the result of a * DNS lookup for a given ldap url. The result consists of a domain name and * its associated ldap server endpoints. */ public class LdapDnsProviderResult { private String domainName; private List endpoints; /** * Construct an LdapDnsProviderResult consisting of a resolved domain name * and the ldap server endpoints that serve the domain. * * @param domainName the resolved domain name * @param endpoints the resolved ldap server endpoints */ public LdapDnsProviderResult(String domainName, List endpoints) { this.domainName = domainName; this.endpoints = endpoints; } /** * Get the domain name resolved from the ldap URL. * * @return the resolved domain name */ public String getDomainName() { return domainName; } /** * Get the individual server endpoints resolved from the ldap URL. * * @return the resolved ldap server endpoints */ public List getEndpoints() { return endpoints; } }