Package org.xbill.DNS

Examples of org.xbill.DNS.SimpleResolver$Stream


     * @return a dns resolver pointing to the local fake server
     */
    protected DNSService getDNSServiceFakeServer() {
        Resolver resolver = null;
        try {
            resolver = new SimpleResolver("127.0.0.1");
        } catch (UnknownHostException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        resolver.setPort(FAKE_SERVER_PORT);
View Full Code Here


   * @param aResolver The resolver to use
   * @throws DnsSdDiscoveryException if hostname cannot be resolved
   */
  public void setResolver(String aResolver) {
    try {
      resolver = new SimpleResolver(aResolver);
    } catch (UnknownHostException e) {
      throw new DnsSdDiscoveryException(e);
    }
  }
View Full Code Here

    }
   
    // instantiate a default resolver
    if(resolver == null) {
      try {
        resolver = new SimpleResolver();
      } catch (UnknownHostException e) {
        throw new ContainerConnectException(e);
      }
    }
   
View Full Code Here

    }
   
    // instantiate a default resolver
    if(resolver == null) {
      try {
        resolver = new SimpleResolver();
        resolver.setTCP(true);
      } catch (UnknownHostException e) {
        throw new ContainerConnectException(e);
      }
    }
View Full Code Here

      Record record = (Record) itr.next();
      String name = record.getName().toString();
      if(name.startsWith("_" + DnsSdTestHelper.REG_SCHEME + "._" + DnsSdTestHelper.PROTO)) {
        Update update = new Update(Name.fromString(DnsSdTestHelper.REG_DOMAIN + "."));
        update.delete(record);
        SimpleResolver resolver = new SimpleResolver(DnsSdTestHelper.DNS_SERVER);
        resolver.setTCP(true);
        resolver.setTSIGKey(new TSIG(DnsSdTestHelper.TSIG_KEY_NAME, DnsSdTestHelper.TSIG_KEY));
        Message response = resolver.send(update);
        int rcode = response.getRcode();
        assertTrue("", rcode == 0);
      }
    }
  }
View Full Code Here

      final Record record = Record.fromString(name, Type.TXT, DClass.IN,
          serviceInfo.getTTL(), key + "=" + value, zone);
      update = new Update(zone);
      update.add(record);
    }
    final SimpleResolver resolver = new SimpleResolver(DnsSdTestHelper.DNS_SERVER);
    resolver.setTCP(true);
    resolver.setTSIGKey(new TSIG(DnsSdTestHelper.TSIG_KEY_NAME, DnsSdTestHelper.TSIG_KEY));
    final Message response = resolver.send(update);
    final int rcode = response.getRcode();
    assertTrue("", rcode == 0);
  }
View Full Code Here

      serviceInfo.getLocation().getPort() + " " +
      serviceInfo.getLocation().getHost() + ".";
    final Record record = Record.fromString(type, Type.SRV, DClass.IN, DnsSdTestHelper.TTL, s, zone);
    final Update update = new Update(zone);
    update.add(record);
    final SimpleResolver resolver = new SimpleResolver(DnsSdTestHelper.DNS_SERVER);
    resolver.setTCP(true);
    resolver.setTSIGKey(new TSIG(DnsSdTestHelper.TSIG_KEY_NAME, DnsSdTestHelper.TSIG_KEY));
    final Message response = resolver.send(update);
    final int rcode = response.getRcode();
    assertTrue("", rcode == 0);
  }
View Full Code Here

TOP

Related Classes of org.xbill.DNS.SimpleResolver$Stream

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.