2609N/A * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A DnsContextFactory serves as the initial context factory for DNS. 0N/A * <p> When an initial context is being created, the environment 0N/A * property "java.naming.provider.url" should contain a DNS pseudo-URL 0N/A * (see DnsUrl) or a space-separated list of them. Multiple URLs must 0N/A * all have the same domain value. 0N/A * If the property is not set, the default "dns:" is used. 0N/A * @author Scott Seligman 0N/A * "urls" are used to determine the servers, but any domain 0N/A * components are overridden by "domain". 0N/A * Public for use by product test suite. 0N/A "Invalid DNS pseudo-URL(s): " +
url);
0N/A // If multiple urls, all must have the same domain. 0N/A "Conflicting domains: " +
url);
0N/A * Returns all the servers specified in a set of URLs. 0N/A * If a URL has no host (or port), the servers configured on the 0N/A * underlying platform are used if possible. If no configured 0N/A * servers can be found, then fall back to the old behavior of 0N/A * using "localhost". 0N/A * There must be at least one URL. 0N/A // No server or port given, so look to underlying platform. 0N/A // ResolverConfiguration does some limited caching, so the 0N/A // following is reasonably efficient even if called rapid-fire. 0N/A continue;
// on to next URL (if any, which is unlikely) 0N/A * Returns true if serversForUrls(urls) would make use of servers 0N/A * from the underlying platform. 0N/A * Returns a value for the PROVIDER_URL property (space-separated URL 0N/A * Strings) that reflects the given domain and servers. 0N/A * Each server is of the form "server[:port]". 0N/A * There must be at least one server. 0N/A * IPv6 literal host names include delimiting brackets. 0N/A // assert false : "ISO-Latin-1 charset unavailable"; 0N/A * Reads environment to find URL(s) of initial context. 0N/A * Default URL is "dns:". 2893N/A * Removes any DNS server that's not permitted to access 2893N/A * @param input the input server[:port] list, must not be null 2893N/A * @param oneIsEnough return output once there exists one ok 2893N/A * @return the filtered list, all non-permitted input removed