Home / Function/ loadNativeLibrary() — netty Function Reference

loadNativeLibrary() — netty Function Reference

Architecture documentation for the loadNativeLibrary() function in MacOSDnsServerAddressStreamProvider.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  762fdf21_e4f7_eaa8_5606_bd43986ec0b2["loadNativeLibrary()"]
  268a4b26_3b4a_685c_306c_99ddbf78df83["MacOSDnsServerAddressStreamProvider"]
  762fdf21_e4f7_eaa8_5606_bd43986ec0b2 -->|defined in| 268a4b26_3b4a_685c_306c_99ddbf78df83
  style 762fdf21_e4f7_eaa8_5606_bd43986ec0b2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

resolver-dns-classes-macos/src/main/java/io/netty/resolver/dns/macos/MacOSDnsServerAddressStreamProvider.java lines 84–102

    private static void loadNativeLibrary() {
        if (!PlatformDependent.isOsx()) {
            throw new IllegalStateException("Only supported on MacOS/OSX");
        }
        String staticLibName = "netty_resolver_dns_native_macos";
        String sharedLibName = staticLibName + '_' + PlatformDependent.normalizedArch();
        ClassLoader cl = PlatformDependent.getClassLoader(MacOSDnsServerAddressStreamProvider.class);
        try {
            NativeLibraryLoader.load(sharedLibName, cl);
        } catch (UnsatisfiedLinkError e1) {
            try {
                NativeLibraryLoader.load(staticLibName, cl);
                logger.debug("Failed to load {}", sharedLibName, e1);
            } catch (UnsatisfiedLinkError e2) {
                ThrowableUtil.addSuppressed(e1, e2);
                throw e1;
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does loadNativeLibrary() do?
loadNativeLibrary() is a function in the netty codebase, defined in resolver-dns-classes-macos/src/main/java/io/netty/resolver/dns/macos/MacOSDnsServerAddressStreamProvider.java.
Where is loadNativeLibrary() defined?
loadNativeLibrary() is defined in resolver-dns-classes-macos/src/main/java/io/netty/resolver/dns/macos/MacOSDnsServerAddressStreamProvider.java at line 84.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free