StubServer.java :  » Net » customdns » CustomDNS » Java Open Source

Java Open Source » Net » customdns 
customdns » CustomDNS » StubServer.java
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);
  }
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.