I have to connect Active Directory and fetch data based on the domain names. Using LDAP connection with Java. For this I wanted to identify closest domain controller first. Is there any method or API available in Java to identify closest domain controller based on domain name?