/** * Creates a new Extended Resolver * * @param servers An array of server names for which SimpleResolver contexts should be * initialized. * @see SimpleResolver * @exception UnknownHostException Failure occured initializing SimpleResolvers */ public ExtendedResolver(String[] servers) throws UnknownHostException { init(); for (int i = 0; i < servers.length; i++) { Resolver r = new SimpleResolver(servers[i]); r.setTimeout(quantum); resolvers.add(r); } }
/** * Creates a new Extended Resolver. The default ResolverConfig is used to determine the servers * for which SimpleResolver contexts should be initialized. * * @see SimpleResolver * @see ResolverConfig * @exception UnknownHostException Failure occured initializing SimpleResolvers */ public ExtendedResolver() throws UnknownHostException { init(); String[] servers = ResolverConfig.getCurrentConfig().servers(); if (servers != null) { for (int i = 0; i < servers.length; i++) { Resolver r = new SimpleResolver(servers[i]); r.setTimeout(quantum); resolvers.add(r); } } else resolvers.add(new SimpleResolver()); }