Package com.jogamp.common.os
Interface DynamicLinker
-
public interface DynamicLinkerLow level secure dynamic linker access.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUGstatic booleanDEBUG_LOOKUP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclaimAllLinkPermission()voidcloseLibrary(long libraryHandle, boolean debug)Security checks are implicit by previous call ofopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean)retrieving thelibrarHandle.StringgetLastError()Returns a string containing the last error.StringlookupLibraryPathname(long libraryHandle, String symbolName)Security checks are implicit by previous call ofopenLibraryLocal(String, boolean)oropenLibraryGlobal(String, boolean)retrieving thelibrarHandle.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.voidreleaseAllLinkPermission()
-
-
-
Method Detail
-
claimAllLinkPermission
void claimAllLinkPermission() throws SecurityException- Throws:
SecurityException- if user is not granted global access
-
releaseAllLinkPermission
void releaseAllLinkPermission() throws SecurityException- Throws:
SecurityException- if user is not granted global access
-
openLibraryGlobal
long openLibraryGlobal(String pathname, boolean debug) throws SecurityException
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
long openLibraryLocal(String pathname, boolean debug) throws SecurityException
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.
-
lookupLibraryPathname
String lookupLibraryPathname(long libraryHandle, String symbolName) throws SecurityException
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- optional symbol name for an OS which requires the symbol's address to retrieve the path of the containing library- Returns:
- the library pathname if found and supported by OS or
null. - Throws:
IllegalArgumentException- in case caselibraryHandleis unknown.SecurityException- if user is not granted access for the given library handle
-
lookupSymbolGlobal
long lookupSymbolGlobal(String symbolName) throws SecurityException
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, IllegalArgumentExceptionSecurity 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, IllegalArgumentExceptionSecurity 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.
-
-