public interface DynamicLinker
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
DEBUG_LOOKUP |
Modifier and Type | Method and Description |
---|---|
void |
closeLibrary(long libraryHandle)
Security checks are implicit by previous call of
openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean)
retrieving the librarHandle . |
String |
getLastError()
Returns a string containing the last error.
|
long |
lookupSymbol(long libraryHandle,
String symbolName)
Security checks are implicit by previous call of
openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean)
retrieving the librarHandle . |
long |
lookupSymbolGlobal(String symbolName)
If a
SecurityManager is installed, user needs link permissions
for all libraries, i.e. |
long |
openLibraryGlobal(String pathname,
boolean debug)
If a
SecurityManager is installed, user needs link permissions
for the named library. |
long |
openLibraryLocal(String pathname,
boolean debug)
If a
SecurityManager is installed, user needs link permissions
for the named library. |
long openLibraryGlobal(String pathname, boolean debug) throws SecurityException
SecurityManager
is installed, user needs link permissions
for the named library.
Opens the named library, allowing system wide access for other users.
pathname
- the full pathname for the library to opendebug
- set to true to enable debuggingSecurityException
- if user is not granted access for the named library.long openLibraryLocal(String pathname, boolean debug) throws SecurityException
SecurityManager
is installed, user needs link permissions
for the named library.
Opens the named library, restricting access to this process.
pathname
- the full pathname for the library to opendebug
- set to true to enable debuggingSecurityException
- if user is not granted access for the named library.long lookupSymbolGlobal(String symbolName) throws SecurityException
SecurityManager
is installed, user needs link permissions
for all libraries, i.e. for new RuntimePermission("loadLibrary.*");
!symbolName
- global symbol name to lookup up system wide.SecurityException
- if user is not granted access for all libraries.long lookupSymbol(long libraryHandle, String symbolName) throws IllegalArgumentException
openLibraryLocal(String, boolean)
or openLibraryGlobal(String, boolean)
retrieving the librarHandle
.libraryHandle
- a library handle previously retrieved via openLibraryLocal(String, boolean)
or openLibraryGlobal(String, boolean)
.symbolName
- global symbol name to lookup up system wide.IllegalArgumentException
- in case case libraryHandle
is unknown.void closeLibrary(long libraryHandle) throws IllegalArgumentException
openLibraryLocal(String, boolean)
or openLibraryGlobal(String, boolean)
retrieving the librarHandle
.libraryHandle
- a library handle previously retrieved via openLibraryLocal(String, boolean)
or openLibraryGlobal(String, boolean)
.IllegalArgumentException
- in case case libraryHandle
is unknown.String getLastError()