class LibraryDaemon extends java.lang.Object implements NativeAPICaller
LibraryManager API.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.Object |
modToken
Token used to authenticate with the dispatcher when registering APIs.
|
| Constructor and Description |
|---|
LibraryDaemon(boolean single)
Create an instance and export its API to the network.
|
| Modifier and Type | Method and Description |
|---|---|
Signature |
invoke(java.lang.String libname,
java.lang.String funcname,
int ordinal,
boolean persistent,
CallingConvention conv,
Signature signature)
Invoke the defined native API call, loading (and optionally unloading) the library as
needed.
|
void |
release(java.lang.String libname)
Attempts to unload the library identified by the given name.
|
private static java.lang.Object modToken
LibraryDaemon(boolean single)
single - true to startup within the server process which
must bypass the shared infrastructure initialization. Use
false for the normal client JVM startup.public Signature invoke(java.lang.String libname, java.lang.String funcname, int ordinal, boolean persistent, CallingConvention conv, Signature signature)
All exceptions will be raised on the server-side (not here). Instead of throwing an exception, this code will set an error code and return.
invoke in interface NativeAPICallerlibname - The library name where this native procedure should be found.funcname - The function name being called in the library (except where an ordinal is being
used).ordinal - The entry point's ordinal or -1 if the entry point should be found by name.persistent - true to leave the library loaded when the native call is complete.conv - The calling convention to be used in this native call.signature - Contains the return value and argument descriptors. In the case of the arguments
there will be 1 descriptor for each argument to the call (where the 0 index is
the leftmost argument and the numargs - 1 index is the rightmost). Each
descriptor defines the type and will contain any input value in the case of an
argument. If the return value descriptor is null, the call should
be treated as a void return.public void release(java.lang.String libname)
release in interface NativeAPICallerlibname - The name of the library to attempt to unload.