|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clearsilver.jni.JNI
public final class JNI
Loads the ClearSilver JNI library.
By default, it attempts to load the library 'clearsilver-jni' from the
path specified in the 'java.library.path' system property. However, this
can be overriden by calling setLibraryName(String)
and
setLibrarySearchPaths(String[])
.
If this fails, the JVM exits with a code of 1. However, this strategy
can be changed using setFailureCallback(Runnable)
.
Field Summary | |
---|---|
static Runnable |
EXIT_JVM
Failure callback strategy that writes a message to sysout, then calls System.exit(1). |
static Runnable |
THROW_ERROR
Failure callback strategy that throws an UnsatisfiedLinkError, which should be caught be client code. |
Constructor Summary | |
---|---|
JNI()
|
Method Summary | |
---|---|
static void |
loadLibrary()
Attempts to load the ClearSilver JNI library. |
static void |
setFailureCallback(Runnable failureCallback)
Sets a callback for what should happen if the JNI library cannot be loaded. |
static void |
setLibraryName(String libraryName)
Set name of JNI library to load. |
static void |
setLibrarySearchPaths(String... paths)
Sets locations where JNI library is searched. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Runnable EXIT_JVM
public static Runnable THROW_ERROR
Constructor Detail |
---|
public JNI()
Method Detail |
---|
public static void loadLibrary()
setFailureCallback(Runnable)
public static void setFailureCallback(Runnable failureCallback)
EXIT_JVM
.
EXIT_JVM
,
THROW_ERROR
public static void setLibraryName(String libraryName)
public static void setLibrarySearchPaths(String... paths)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |