Package com.jogamp.common.os
Interface DynamicLinker
public interface DynamicLinker
Low level secure dynamic linker access.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcloseLibrary(long libraryHandle, boolean debug) Security checks are implicit by previous call ofopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean)retrieving thelibrarHandle.Returns a string containing the last error.longlookupSymbol(long libraryHandle, String symbolName) Security checks are implicit by previous call ofopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean)retrieving thelibrarHandle.longlookupSymbolGlobal(String symbolName) If aSecurityManageris installed, user needs link permissions for all libraries, i.e.longopenLibraryGlobal(String pathname, boolean debug) If aSecurityManageris installed, user needs link permissions for the named library.longopenLibraryLocal(String pathname, boolean debug) If aSecurityManageris installed, user needs link permissions for the named library.void
-
Field Details
-
DEBUG
static final boolean DEBUG -
DEBUG_LOOKUP
static final boolean DEBUG_LOOKUP
-
-
Method Details
-
claimAllLinkPermission
- Throws:
SecurityException- if user is not granted global access
-
releaseAllLinkPermission
- Throws:
SecurityException- if user is not granted global access
-
openLibraryGlobal
If aSecurityManageris installed, user needs link permissions for the named library.Opens the named library, allowing system wide access for other users.
- Parameters:
pathname- the full pathname for the library to opendebug- set to true to enable debugging- Returns:
- the library handle, maybe 0 if not found.
- Throws:
SecurityException- if user is not granted access for the named library.
-
openLibraryLocal
If aSecurityManageris installed, user needs link permissions for the named library.Opens the named library, restricting access to this process.
- Parameters:
pathname- the full pathname for the library to opendebug- set to true to enable debugging- Returns:
- the library handle, maybe 0 if not found.
- Throws:
SecurityException- if user is not granted access for the named library.
-
lookupSymbolGlobal
If aSecurityManageris installed, user needs link permissions for all libraries, i.e. fornew RuntimePermission("loadLibrary.*");!- Parameters:
symbolName- global symbol name to lookup up system wide.- Returns:
- the library handle, maybe 0 if not found.
- Throws:
SecurityException- if user is not granted access for all libraries.
-
lookupSymbol
long lookupSymbol(long libraryHandle, String symbolName) throws SecurityException, IllegalArgumentException Security checks are implicit by previous call ofopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean)retrieving thelibrarHandle.- Parameters:
libraryHandle- a library handle previously retrieved viaopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean).symbolName- global symbol name to lookup up system wide.- Returns:
- the library handle, maybe 0 if not found.
- Throws:
IllegalArgumentException- in case caselibraryHandleis unknown.SecurityException- if user is not granted access for the given library handle
-
closeLibrary
void closeLibrary(long libraryHandle, boolean debug) throws SecurityException, IllegalArgumentException Security checks are implicit by previous call ofopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean)retrieving thelibrarHandle.- Parameters:
libraryHandle- a library handle previously retrieved viaopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean).debug- set to true to enable debugging- Throws:
IllegalArgumentException- in case caselibraryHandleis unknown.SecurityException- if user is not granted access for the given library handle
-
getLastError
String getLastError()Returns a string containing the last error. Maybe called for debuging purposed if any method fails.- Returns:
- error string, maybe null. A null or non-null value has no semantics.
-