|
Nuxeo Enterprise Platform 5.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.ecm.directory.ldap.dns.DNSServiceResolverImpl
public class DNSServiceResolverImpl
Utility class to perform DNS lookups for services.
| Field Summary | |
|---|---|
protected Map<String,List<DNSServiceEntry>> |
cache
Create a cache to hold the at most 100 recent DNS lookups for a period of 10 minutes. |
protected static DirContext |
context
|
protected static DNSServiceResolver |
instance
|
protected long |
lastCacheUpdate
|
static Log |
log
|
protected long |
maxDelay
|
protected static String |
SRV_RECORD
|
| Fields inherited from interface org.nuxeo.ecm.directory.ldap.dns.DNSServiceResolver |
|---|
DNS_CACHE_EXPIRY, LDAP_SERVICE_PREFIX |
| Constructor Summary | |
|---|---|
protected |
DNSServiceResolverImpl()
|
| Method Summary | |
|---|---|
static DNSServiceResolver |
getInstance()
|
protected List<DNSServiceEntry> |
resolveDnsServiceRecord(String service,
String domain)
Returns the host name and port that a server providing the specified service can be reached at. |
List<DNSServiceEntry> |
resolveLDAPDomainServers(String domain)
Returns a list of LDAP servers for the specified domain by performing an SRV DNS lookup on _ldap. |
List<DNSServiceEntry> |
resolveLDAPDomainServers(String domain,
String prefix)
Returns a list of LDAP servers for the specified domain by performing an SRV DNS lookup using a custom DNS service prefix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Log log
protected static DNSServiceResolver instance
protected static final String SRV_RECORD
protected Map<String,List<DNSServiceEntry>> cache
protected long lastCacheUpdate
protected final long maxDelay
protected static DirContext context
| Constructor Detail |
|---|
protected DNSServiceResolverImpl()
| Method Detail |
|---|
public static final DNSServiceResolver getInstance()
protected List<DNSServiceEntry> resolveDnsServiceRecord(String service,
String domain)
throws NamingException
As an example, a lookup for "example.com" for the service _gc._tcp may return "dc01.example.com:3268".
service - the service.domain - the domain.
NamingException - if the DNS server is unreachable
public List<DNSServiceEntry> resolveLDAPDomainServers(String domain)
throws NamingException
DNSServiceResolver
resolveLDAPDomainServers in interface DNSServiceResolverNamingException
public List<DNSServiceEntry> resolveLDAPDomainServers(String domain,
String prefix)
throws NamingException
DNSServiceResolver
resolveLDAPDomainServers in interface DNSServiceResolverprefix - custom SRV prefix such as "_gc._tcp"
NamingException
|
Nuxeo Enterprise Platform 5.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||