Examples of PTRRecord


Examples of org.xbill.DNS.PTRRecord

        Record[] records = lookupNoException(name.toString(), Type.PTR, "PTR");

        if (records == null) {
            result = addr.getHostAddress();
        } else {
            PTRRecord ptr = (PTRRecord) records[0];
            result = ptr.getTarget().toString();
        }
        return result;
    }
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

  }

  @Override
  protected PTRRecord createRecord(final Name name, final int dclass,
      final long ttl, final ObjectNode recordNode) {
    return new PTRRecord(name, dclass, ttl, getNodeNameValue(recordNode,
        "target"));
  }
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                    case Type.MX:
                        MXRecord mx = (MXRecord) rr[i];
                        records.add(mx.getTarget().toString());
                        break;
                    case Type.PTR:
                        PTRRecord ptr = (PTRRecord) rr[i];
                        records.add(IPAddr.stripDot(ptr.getTarget().toString()));
                        break;
                    case Type.TXT:
                        TXTRecord txt = (TXTRecord) rr[i];
                        records.add(txt.rdataToString());
                        break;
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                                        if (!((String) value).endsWith(".")) {
                                            value = ((String) value)+".";
                                        }
                                        if ("PTR".equals(type)) {
                                            records
                                                    .add(new PTRRecord(
                                                            hostname,
                                                            DClass.IN,
                                                            3600,
                                                            Name
                                                                    .fromString((String) value)));
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

      final Record[] records = getRecords(serviceType);
      if(records.length == 0) {
        res.addAll(serviceType.getScopesAsZones());
      } else {
        for (int j = 0; j < records.length; j++) {
          final PTRRecord record = (PTRRecord) records[j];
          final String target = record.getTarget().toString();
          if(isFinal(record)) {
            res.add(target.toString());
          } else {
            if(!res.contains(target)) { // guard against cycles
              final BnRDnsSdServiceTypeID newServiceType =
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

    final int length = queryResult == null ? 0 : queryResult.length;
    for (int j = 0; j < length; j++) {
      Record[] srvQueryResult = null;
      final Record record = queryResult[j];
      if(record instanceof PTRRecord) {
        final PTRRecord ptrRecord = (PTRRecord) record;
        final Name target = ptrRecord.getTarget();
        final Lookup srvQuery = new Lookup(target, Type.SRV);
        srvQuery.setResolver(resolver);
        srvQueryResult = srvQuery.run();
      } else if (record instanceof SRVRecord) {
        srvQueryResult = new SRVRecord[]{(SRVRecord) record};
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

    List result = new ArrayList();
    Record[] queryResult = getRecords(serviceTypeId);
    for (int j = 0; j < queryResult.length; j++) {
      Record record = queryResult[j];
      if(record instanceof PTRRecord) {
        PTRRecord ptrRecord = (PTRRecord) record;
        result.add(new DnsSdServiceTypeID(getServicesNamespace(), ptrRecord.getTarget()));
      } else if (record instanceof SRVRecord) {
        SRVRecord srvRecord = (SRVRecord) record;
        result.add(new DnsSdServiceTypeID(getServicesNamespace(), srvRecord.getName()));
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.