Methods Summary |
---|
public static native java.lang.String | aprVersionString()
|
public static native long | globalPool()
|
private static native boolean | has(int what)
|
public static boolean | initialize(java.lang.String libraryName)Setup any APR internal data structures. This MUST be the first function
called for any APR library.
/* return global TCN's APR pool */
if (_instance == null) {
if (libraryName == null)
_instance = new Library();
else
_instance = new Library(libraryName);
TCN_MAJOR_VERSION = version(0x01);
TCN_MINOR_VERSION = version(0x02);
TCN_PATCH_VERSION = version(0x03);
TCN_IS_DEV_VERSION = version(0x04);
APR_MAJOR_VERSION = version(0x11);
APR_MINOR_VERSION = version(0x12);
APR_PATCH_VERSION = version(0x13);
APR_IS_DEV_VERSION = version(0x14);
APR_SIZEOF_VOIDP = size(1);
APR_PATH_MAX = size(2);
APRMAXHOSTLEN = size(3);
APR_MAX_IOVEC_SIZE = size(4);
APR_MAX_SECS_TO_LINGER = size(5);
APR_MMAP_THRESHOLD = size(6);
APR_MMAP_LIMIT = size(7);
APR_HAVE_IPV6 = has(0);
APR_HAS_SHARED_MEMORY = has(1);
APR_HAS_THREADS = has(2);
APR_HAS_SENDFILE = has(3);
APR_HAS_MMAP = has(4);
APR_HAS_FORK = has(5);
APR_HAS_RANDOM = has(6);
APR_HAS_OTHER_CHILD = has(7);
APR_HAS_DSO = has(8);
APR_HAS_SO_ACCEPTFILTER = has(9);
APR_HAS_UNICODE_FS = has(10);
APR_HAS_PROC_INVOKED = has(11);
APR_HAS_USER = has(12);
APR_HAS_LARGE_FILES = has(13);
APR_HAS_XTHREAD_FILES = has(14);
APR_HAS_OS_UUID = has(15);
APR_IS_BIGENDIAN = has(16);
APR_FILES_AS_SOCKETS = has(17);
APR_CHARSET_EBCDIC = has(18);
APR_TCP_NODELAY_INHERITED = has(19);
APR_O_NONBLOCK_INHERITED = has(20);
if (APR_MAJOR_VERSION < 1) {
throw new UnsatisfiedLinkError("Unsupported APR Version (" +
aprVersionString() + ")");
}
if (!APR_HAS_THREADS) {
throw new UnsatisfiedLinkError("Missing APR_HAS_THREADS");
}
}
return initialize();
|
private static native boolean | initialize()
|
private static native int | size(int what)
|
public static native void | terminate()
|
private static native int | version(int what)
|
public static native java.lang.String | versionString()
|