Package org.apache.tomcat.jni
Class Library
- java.lang.Object
-
- org.apache.tomcat.jni.Library
-
public final class Library extends java.lang.ObjectManages loading of the Tomcat Native (tcnative) library.
-
-
Field Summary
Fields Modifier and Type Field Description static intAPR_IS_DEV_VERSIONAPR is development version flag.static intAPR_MAJOR_VERSIONAPR major version.static intAPR_MINOR_VERSIONAPR minor version.static intAPR_PATCH_VERSIONAPR patch version.static intTCN_IS_DEV_VERSIONTCN is development version flag.static intTCN_MAJOR_VERSIONTCN major version.static intTCN_MINOR_VERSIONTCN minor version.static intTCN_PATCH_VERSIONTCN patch version.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringaprVersionString()Returns the APR version string.static booleaninitialize(java.lang.String libraryName)Setup any APR internal data structures.static voidterminate()Destroys Tomcat Native's global APR pool.static java.lang.StringversionString()Returns the TCN version string.
-
-
-
Field Detail
-
TCN_MAJOR_VERSION
public static int TCN_MAJOR_VERSION
TCN major version.
-
TCN_MINOR_VERSION
public static int TCN_MINOR_VERSION
TCN minor version.
-
TCN_PATCH_VERSION
public static int TCN_PATCH_VERSION
TCN patch version.
-
TCN_IS_DEV_VERSION
public static int TCN_IS_DEV_VERSION
TCN is development version flag.
-
APR_MAJOR_VERSION
public static int APR_MAJOR_VERSION
APR major version.
-
APR_MINOR_VERSION
public static int APR_MINOR_VERSION
APR minor version.
-
APR_PATCH_VERSION
public static int APR_PATCH_VERSION
APR patch version.
-
APR_IS_DEV_VERSION
public static int APR_IS_DEV_VERSION
APR is development version flag.
-
-
Method Detail
-
terminate
public 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.
-
versionString
public static java.lang.String versionString()
Returns the TCN version string.- Returns:
- the TCN version string
-
aprVersionString
public static java.lang.String aprVersionString()
Returns the APR version string.- Returns:
- the APR version string
-
initialize
public static boolean initialize(java.lang.String libraryName) throws java.lang.ExceptionSetup 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 otherwisefalse- Throws:
java.lang.Exception- if a problem occurred during initialization
-
-