package CustomDNS;
import java.lang.Exception;
import net.espeak.infra.cci.exception.*;
import net.espeak.jesi.*;
import ZoneAuthorityIntf;
public class StubServer {
public static void main (String [] args) {
try {
ESConnection core = new ESConnection();
ESServiceFinder finder = new ESServiceFinder(core,
"ZoneAuthorityIntf");
ESQuery query = new ESQuery("Name == 'randomhacks.com'");
ZoneAuthorityIntf auth = (ZoneAuthorityIntf) finder.find(query);
for (int i = 0; i < 20; i++) {
String addr = auth.getAddressForHost("foo1.randomhacks.com");
System.out.println(addr);
}
} catch (Exception e) {
System.err.println("StubServer: " + e.toString());
System.exit(1);
}
}
}
|