Package org.apache.tomcat.jni
Class Library
java.lang.Object
org.apache.tomcat.jni.Library
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static booleanDeprecated.static intstatic intstatic intDeprecated.static intDeprecated.static intstatic intDeprecated.static intDeprecated.static booleanDeprecated.static intstatic intDeprecated.static booleanDeprecated.static intDeprecated.static booleanDeprecated.static intDeprecated.static intstatic intstatic intstatic int
- 
Method SummaryModifier and TypeMethodDescriptionstatic Stringstatic longstatic longDeprecated.static booleaninitialize(String libraryName) Setup any APR internal data structures.static voidDeprecated.Unused.static voidloadLibrary(String libname) Deprecated.Unused.static voidstatic voidDestroys Tomcat Native's global APR pool.static voidAllows for thread safe termination when other threads may be attempting clean-up concurrently with the current thread.static booleantryCleanUpLock(long cleanupGeneration) static String
- 
Field Details- 
TCN_MAJOR_VERSIONpublic static int TCN_MAJOR_VERSION
- 
TCN_MINOR_VERSIONpublic static int TCN_MINOR_VERSION
- 
TCN_PATCH_VERSIONpublic static int TCN_PATCH_VERSION
- 
TCN_IS_DEV_VERSIONpublic static int TCN_IS_DEV_VERSION
- 
APR_MAJOR_VERSIONpublic static int APR_MAJOR_VERSION
- 
APR_MINOR_VERSIONpublic static int APR_MINOR_VERSION
- 
APR_PATCH_VERSIONpublic static int APR_PATCH_VERSION
- 
APR_IS_DEV_VERSIONpublic static int APR_IS_DEV_VERSION
- 
APR_HAVE_IPV6Deprecated.
- 
APR_HAS_SHARED_MEMORYDeprecated.
- 
APR_HAS_THREADSDeprecated.
- 
APR_HAS_SENDFILEDeprecated.
- 
APR_HAS_MMAPDeprecated.
- 
APR_HAS_FORKDeprecated.
- 
APR_HAS_RANDOMDeprecated.
- 
APR_HAS_OTHER_CHILDDeprecated.
- 
APR_HAS_DSODeprecated.
- 
APR_HAS_SO_ACCEPTFILTERDeprecated.
- 
APR_HAS_UNICODE_FSDeprecated.
- 
APR_HAS_PROC_INVOKEDDeprecated.
- 
APR_HAS_USERDeprecated.
- 
APR_HAS_LARGE_FILESDeprecated.
- 
APR_HAS_XTHREAD_FILESDeprecated.
- 
APR_HAS_OS_UUIDDeprecated.
- 
APR_IS_BIGENDIANDeprecated.
- 
APR_FILES_AS_SOCKETSDeprecated.
- 
APR_CHARSET_EBCDICDeprecated.
- 
APR_TCP_NODELAY_INHERITEDDeprecated.
- 
APR_O_NONBLOCK_INHERITEDDeprecated.
- 
APR_POLLSET_WAKEABLEDeprecated.
- 
APR_HAVE_UNIXDeprecated.
- 
APR_SIZEOF_VOIDPDeprecated.
- 
APR_PATH_MAXDeprecated.
- 
APRMAXHOSTLENDeprecated.
- 
APR_MAX_IOVEC_SIZEDeprecated.
- 
APR_MAX_SECS_TO_LINGERDeprecated.
- 
APR_MMAP_THRESHOLDDeprecated.
- 
APR_MMAP_LIMITDeprecated.
 
- 
- 
Method Details- 
threadSafeTerminatepublic static void threadSafeTerminate()Allows for thread safe termination when other threads may be attempting clean-up concurrently with the current thread. Waits for any threads currently holding the clean-up lock to release the lock and then callsterminate().
- 
terminatepublic static void terminate()Destroys Tomcat Native's global APR pool. This has to be the last call to TCN library. This will destroy any APR root pools that have not been explicitly destroyed.This method should only be used if the caller is certain that all other threads have finished using the native library. 
- 
versionString
- 
aprVersionString
- 
globalPoolDeprecated.
- 
initializeSetup any APR internal data structures. This MUST be the first function called for any APR library.- Parameters:
- libraryName- the name of the library to load
- Returns:
- trueif the native code was initialized successfully otherwise- false
- Throws:
- Exception- if a problem occurred during initialization
 
- 
tryCleanUpLockpublic static boolean tryCleanUpLock(long cleanupGeneration) 
- 
getGenerationpublic static long getGeneration()
- 
returnCleanUpLockpublic static void returnCleanUpLock()
- 
loadDeprecated.Unused. Will be removed in Tomcat 10.1.xCalls System.load(filename). System.load() associates the loaded library with the class loader of the class that called the System method. A native library may not be loaded by more than one class loader, so calling the System method from a class that was loaded by a Webapp class loader will make it impossible for other Webapps to load it. Using this method will load the native library via a shared class loader (typically the Common class loader, but may vary in some configurations), so that it can be loaded by multiple Webapps.- Parameters:
- filename- - absolute path of the native library
 
- 
loadLibraryDeprecated.Unused. Will be removed in Tomcat 10.1.xCalls System.loadLibrary(libname). System.loadLibrary() associates the loaded library with the class loader of the class that called the System method. A native library may not be loaded by more than one class loader, so calling the System method from a class that was loaded by a Webapp class loader will make it impossible for other Webapps to load it. Using this method will load the native library via a shared class loader (typically the Common class loader, but may vary in some configurations), so that it can be loaded by multiple Webapps.- Parameters:
- libname- - the name of the native library
 
 
-