Class Library

java.lang.Object
io.netty.internal.tcnative.Library

public final class Library extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • tryLoadClasses

      private static void tryLoadClasses(ClassLoader classLoader, Class<?>... classes)
      Preload the given classes and so ensure the ClassLoader has these loaded after this method call.
      Parameters:
      classLoader - the ClassLoader
      classes - the classes to load.
    • tryLoadClass

      private static void tryLoadClass(ClassLoader classLoader, String className)
    • loadLibrary

      private static void loadLibrary(String libraryName)
    • calculatePackagePrefix

      private static String calculatePackagePrefix()
      The shading prefix added to this class's full name.
      Throws:
      UnsatisfiedLinkError - if the shader used something other than a prefix
    • initialize0

      private static boolean initialize0()
    • aprHasThreads

      private static boolean aprHasThreads()
    • aprMajorVersion

      private static int aprMajorVersion()
    • aprVersionString

      private static String aprVersionString()
    • initialize

      public static boolean initialize() throws Exception
      Calls initialize(String, String) with "provided" and null.
      Returns:
      true if initialization was successful
      Throws:
      Exception - if an error happens during initialization
    • initialize

      public static boolean initialize(String libraryName, String engine) throws Exception
      Setup native library. This is the first method that must be called!
      Parameters:
      libraryName - the name of the library to load
      engine - Support for external a Crypto Device ("engine"), usually
      Returns:
      true if initialization was successful
      Throws:
      Exception - if an error happens during initialization