Package org.xbill.DNS

Examples of org.xbill.DNS.Lookup


     
      IServiceTypeID aServiceTypeID = new DnsSdServiceTypeID(getConnectNamespace(), srvRecord.getName());
     
      // query for txt records (attributes)
      Properties props = new Properties();
      Lookup txtQuery = new Lookup(srvRecord.getName(), Type.TXT);
      txtQuery.setResolver(resolver);
      Record[] txtQueryResults = txtQuery.run();
      int length = txtQueryResults == null ? 0 : txtQueryResults.length;
      for (int l = 0; l < length; l++) {
        TXTRecord txtResult = (TXTRecord) txtQueryResults[l];
        List strings = txtResult.getStrings();
        for (Iterator itr = strings.iterator(); itr.hasNext();) {
View Full Code Here


    @Override
    public List<SRVRecord> lookupSRVRecords(String name) {
        List<SRVRecord> res = new ArrayList<SRVRecord>();

        try {
            Lookup lookup = new Lookup(name, Type.SRV);
            Record recs[] = lookup.run();
            if (recs == null)
                return res;

            for (Record record : recs) {
                org.xbill.DNS.SRVRecord srvRecord = (org.xbill.DNS.SRVRecord) record;
View Full Code Here

TOP

Related Classes of org.xbill.DNS.Lookup

Copyright © 2018 www.massapicom. 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.