MacOSDnsServerAddressStreamProvider.java — netty Source File
Architecture documentation for MacOSDnsServerAddressStreamProvider.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2019 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.resolver.dns.macos;
import io.netty.resolver.dns.DnsServerAddressStream;
import io.netty.resolver.dns.DnsServerAddressStreamProvider;
import io.netty.resolver.dns.DnsServerAddressStreamProviders;
import io.netty.resolver.dns.DnsServerAddresses;
import io.netty.util.internal.ClassInitializerUtil;
import io.netty.util.internal.NativeLibraryLoader;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.ThrowableUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.net.InetSocketAddress;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
/**
* {@link DnsServerAddressStreamProvider} implementation which makes use of the same mechanism as
* <a href="https://opensource.apple.com/tarballs/mDNSResponder/">Apple's open source mDNSResponder</a> to retrieve the
* current nameserver configuration of the system.
*/
public final class MacOSDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
private static final Comparator<DnsResolver> RESOLVER_COMPARATOR =
new Comparator<DnsResolver>() {
@Override
public int compare(DnsResolver r1, DnsResolver r2) {
// Note: order is descending (from higher to lower) so entries with lower search order override
// entries with higher search order.
return r1.searchOrder() < r2.searchOrder() ? 1 : r1.searchOrder() == r2.searchOrder() ? 0 : -1;
}
};
private static final Throwable UNAVAILABILITY_CAUSE;
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(MacOSDnsServerAddressStreamProvider.class);
// ... (143 more lines)
Domain
Subdomains
Source
Frequently Asked Questions
What does MacOSDnsServerAddressStreamProvider.java do?
MacOSDnsServerAddressStreamProvider.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is MacOSDnsServerAddressStreamProvider.java in the architecture?
MacOSDnsServerAddressStreamProvider.java is located at resolver-dns-classes-macos/src/main/java/io/netty/resolver/dns/macos/MacOSDnsServerAddressStreamProvider.java (domain: Buffer, subdomain: Search, directory: resolver-dns-classes-macos/src/main/java/io/netty/resolver/dns/macos).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free