public static void toJson(DnsClientOptions obj, java.util.Map<String, Object> json) { if (obj.getHost() != null) { json.put("host", obj.getHost()); } json.put("logActivity", obj.getLogActivity()); json.put("port", obj.getPort()); json.put("queryTimeout", obj.getQueryTimeout()); json.put("recursionDesired", obj.isRecursionDesired()); } }
public Query(String name, DnsRecordType[] types, Handler<AsyncResult<List<T>>> handler) { this.msg = new DatagramDnsQuery(null, dnsServer, ThreadLocalRandom.current().nextInt()).setRecursionDesired(options.isRecursionDesired()); for (DnsRecordType type: types) { msg.addRecord(DnsSection.QUESTION, new DefaultDnsQuestion(name, type, DnsRecord.CLASS_IN)); } this.fut = Future.<List<T>>future().setHandler(handler); this.types = types; this.name = name; }
public static void toJson(DnsClientOptions obj, java.util.Map<String, Object> json) { if (obj.getHost() != null) { json.put("host", obj.getHost()); } json.put("logActivity", obj.getLogActivity()); json.put("port", obj.getPort()); json.put("queryTimeout", obj.getQueryTimeout()); json.put("recursionDesired", obj.isRecursionDesired()); } }
public Query(String name, DnsRecordType[] types, Handler<AsyncResult<List<T>>> handler) { this.msg = new DatagramDnsQuery(null, dnsServer, ThreadLocalRandom.current().nextInt()).setRecursionDesired(options.isRecursionDesired()); for (DnsRecordType type: types) { msg.addRecord(DnsSection.QUESTION, new DefaultDnsQuestion(name, type, DnsRecord.CLASS_IN)); } this.fut = Future.<List<T>>future().setHandler(handler); this.types = types; this.name = name; }