@SuppressWarnings("unchecked") @Test public void loopIterativeTest() throws IOException { IterativeDnsClient client = new IterativeDnsClient(new LruCache(0)); applyZones(client, rootZone( record("a", ns("a.ns")), record("b", ns("b.ns")), record("a.ns", a("1.1.1.1")), record("b.ns", a("1.1.1.2")) ), zone("a", "a.ns", "1.1.1.1", record("test.a", ns("a.test.b")) ), zone("b", "b.ns", "1.1.1.2", record("test.b", ns("b.test.a")) ) ); assertThrows(IterativeClientException.LoopDetected.class, () -> client.query("www.test.a", TYPE.A) ); }
@Override protected DnsQueryResult query(DnsMessage.Builder queryBuilder) throws IOException { DnsMessage q = queryBuilder.build(); ResolutionState resolutionState = new ResolutionState(this); DnsQueryResult result = queryRecursive(resolutionState, q); return result; }
IterativeDnsClient extends AbstractDnsClient { @Override protected DnsQueryResult query(DnsMessage.Builder queryBuilder) throws IOException { DnsMessage q = queryBuilder.build(); ResolutionState resolutionState = new ResolutionState(this); DnsQueryResult result = queryRecursive(resolutionState, q); return result; } }
IterativeDnsClient extends AbstractDnsClient { @Override protected DnsQueryResult query(DnsMessage.Builder queryBuilder) throws IOException { DnsMessage q = queryBuilder.build(); ResolutionState resolutionState = new ResolutionState(this); DnsQueryResult result = queryRecursive(resolutionState, q); return result; } IterativeDnsClient();  IterativeDnsClient(DnsCache cache); }
IterativeDnsClient extends AbstractDnsClient { @Override protected DnsQueryResult query(DnsMessage.Builder queryBuilder) throws IOException { DnsMessage q = queryBuilder.build(); ResolutionState resolutionState = new ResolutionState(this); DnsQueryResult result = queryRecursive(resolutionState, q); return result; } IterativeDnsClient();  IterativeDnsClient(DnsCache cache); static List<InetAddress> getRootServer(char rootServerId); static List<InetAddress> getRootServer(char rootServerId, IpVersionSetting setting); }
IterativeDnsClient extends AbstractDnsClient { @Override protected DnsQueryResult query(DnsMessage.Builder queryBuilder) throws IOException { DnsMessage q = queryBuilder.build(); ResolutionState resolutionState = new ResolutionState(this); DnsQueryResult result = queryRecursive(resolutionState, q); return result; } IterativeDnsClient();  IterativeDnsClient(DnsCache cache); static List<InetAddress> getRootServer(char rootServerId); static List<InetAddress> getRootServer(char rootServerId, IpVersionSetting setting);  }