APIdia Launch Partner
Top Description Fields Constructors Methods
javax.naming.ldap.spi

public final Class LdapDnsProviderResult

extends Object
Class Inheritance
Imports
java.util.List

The result of a DNS lookup for an LDAP URL.

This class is used by an 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.

A null domainName is equivalent to and represented by an empty string.

Since
12

Field Summary

Modifier and TypeField and Description
private final String
private final List<String>

Constructor Summary

AccessConstructor and Description
public
LdapDnsProviderResult(String
the resolved domain name; can be null.
domainName
,
List<String>
the possibly empty list of resolved LDAP server endpoints
endpoints
)

Construct an LdapDnsProviderResult consisting of a resolved domain name and the LDAP server endpoints that serve the domain.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the resolved domain name
getDomainName
()

Returns the domain name resolved from the LDAP URL.

public List<String>

Returns:

a possibly empty unmodifiable List containing the resolved LDAP server endpoints
getEndpoints
()

Returns the possibly empty list of individual server endpoints resolved from the LDAP URL.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

domainNameback to summary
private final String domainName
endpointsback to summary
private final List<String> endpoints

Constructor Detail

LdapDnsProviderResultback to summary
public LdapDnsProviderResult(String domainName, List<String> endpoints)

Construct an LdapDnsProviderResult consisting of a resolved domain name and the LDAP server endpoints that serve the domain.

Parameters
domainName:String

the resolved domain name; can be null.

endpoints:List<String>

the possibly empty list of resolved LDAP server endpoints

Exceptions
NullPointerException:
if endpoints contains null elements.
ClassCastException:
if endpoints contains non- String elements.

Method Detail

getDomainNameback to summary
public String getDomainName()

Returns the domain name resolved from the LDAP URL. This method returns the empty string if the LdapDnsProviderResult is created with a null domain name.

Returns:String

the resolved domain name

getEndpointsback to summary
public List<String> getEndpoints()

Returns the possibly empty list of individual server endpoints resolved from the LDAP URL.

Returns:List<String>

a possibly empty unmodifiable List containing the resolved LDAP server endpoints