Ejemplo n.º 1
0
  /*
   * Queries all resource records of a zone given its domain name and class.
   * If recursion is true, recursion is requested on the query to find
   * the name server (and also on the zone transfer, but it won't matter).
   */
  ResourceRecords queryZone(DnsName zone, int rrclass, boolean recursion) throws NamingException {

    DnsClient cl = new DnsClient(findNameServers(zone, recursion), timeout, retries);
    try {
      return cl.queryZone(zone, rrclass, recursion);
    } finally {
      cl.close();
    }
  }
Ejemplo n.º 2
0
 /*
  * Queries resource records of a particular class and type for a
  * given domain name.
  * Useful values of rrclass are ResourceRecord.[Q]CLASS_xxx.
  * Useful values of rrtype are ResourceRecord.[Q]TYPE_xxx.
  * If recursion is true, recursion is requested on the query.
  * If auth is true, only authoritative responses are accepted.
  */
 ResourceRecords query(DnsName fqdn, int rrclass, int rrtype, boolean recursion, boolean auth)
     throws NamingException {
   return dnsClient.query(fqdn, rrclass, rrtype, recursion, auth);
 }
Ejemplo n.º 3
0
 public void close() {
   dnsClient.close();
   dnsClient = null;
 }