Package org.arch.dns.exception

Examples of org.arch.dns.exception.ConfigurationException


    {
      udpSocket = new DatagramSocket();
    }
    catch (java.net.SocketException e)
    {
      NamingException ne = new ConfigurationException();
      ne.setRootCause(e);
      throw ne;
    }
   
    this.servers = new InetAddress[servers.length];
    serverPorts = new int[servers.length];
   
    for (int i = 0; i < servers.length; i++)
    {
     
      // Is optional port given?
      int colon = servers[i].indexOf(':', servers[i].indexOf(']') + 1);
     
      serverPorts[i] = (colon < 0) ? DEFAULT_PORT : Integer
              .parseInt(servers[i].substring(colon + 1));
      String server = (colon < 0) ? servers[i] : servers[i].substring(0,
              colon);
      try
      {
        this.servers[i] = InetAddress.getByName(server);
      }
      catch (java.net.UnknownHostException e)
      {
        NamingException ne = new ConfigurationException(
                "Unknown DNS server: " + server);
        ne.setRootCause(e);
        throw ne;
      }
    }
    reqs = Collections.synchronizedSet(new HashSet<Integer>());
    resps = Collections.synchronizedMap(new HashMap<Integer, byte[]>());
View Full Code Here

TOP

Related Classes of org.arch.dns.exception.ConfigurationException

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.