Top Inners Fields Constructors Methods
jogamp.common.os

pack-priv abstract Class DynamicLinkerImpl

extends Object
implements DynamicLinker
Class Inheritance
All Implemented Interfaces
com.jogamp.common.os.DynamicLinker
Known Direct Subclasses
jogamp.common.os.UnixDynamicLinkerImpl, jogamp.common.os.WindowsDynamicLinkerImpl
Imports
com.jogamp.common.os.DynamicLinker, com.jogamp.common.util.LongObjectHashMap, .SecurityUtil

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private boolean
private static final LongObjectHashMap
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private final void
private final void
checkLinkPermission(final String pathname)

private final void
checkLinkPermission(final long libraryHandle)

public final void
public final void
closeLibrary(final long
a library handle previously retrieved via openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean).
libraryHandle
,
final boolean
set to true to enable debugging
debug
)

Implements com.jogamp.common.os.DynamicLinker.closeLibrary.

Security checks are implicit by previous call of openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean) retrieving the librarHandle.
protected abstract void
closeLibraryImpl(final long libraryHandle)

private final DynamicLinkerImpl.LibRef
decrLibRefCount(final long handle)

private final DynamicLinkerImpl.LibRef
getLibRef(final long handle)

private final DynamicLinkerImpl.LibRef
incrLibRefCount(final long handle, final String libName)

public final long
lookupSymbol(final long
a library handle previously retrieved via openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean).
libraryHandle
,
final String
global symbol name to lookup up system wide.
symbolName
)

Implements com.jogamp.common.os.DynamicLinker.lookupSymbol.

Security checks are implicit by previous call of openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean) retrieving the librarHandle.
public final long
lookupSymbolGlobal(final String
global symbol name to lookup up system wide.
symbolName
)

Implements com.jogamp.common.os.DynamicLinker.lookupSymbolGlobal.

If a SecurityManager is installed, user needs link permissions for all libraries, i.e. for new RuntimePermission("loadLibrary.*");!
protected abstract long
lookupSymbolGlobalImpl(final String symbolName)

protected abstract long
lookupSymbolLocalImpl(final long libraryHandle, final String symbolName)

public final long
openLibraryGlobal(final String
the full pathname for the library to open
pathname
,
final boolean
set to true to enable debugging
debug
)

Implements com.jogamp.common.os.DynamicLinker.openLibraryGlobal.

If a SecurityManager is installed, user needs link permissions for the named library.
protected abstract long
openLibraryGlobalImpl(final String pathname)

public final long
openLibraryLocal(final String
the full pathname for the library to open
pathname
,
final boolean
set to true to enable debugging
debug
)

Implements com.jogamp.common.os.DynamicLinker.openLibraryLocal.

If a SecurityManager is installed, user needs link permissions for the named library.
protected abstract long
openLibraryLocalImpl(final String pathname)

public final void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allLinkPermissionGrantedback to summary
private boolean allLinkPermissionGranted
libHandle2Nameback to summary
private static final LongObjectHashMap libHandle2Name
secSyncback to summary
private final Object secSync

Constructor Detail

DynamicLinkerImplback to summary
pack-priv DynamicLinkerImpl()

Method Detail

checkAllLinkPermissionback to summary
private final void checkAllLinkPermission() throws SecurityException
checkLinkPermissionback to summary
private final void checkLinkPermission(final String pathname) throws SecurityException
checkLinkPermissionback to summary
private final void checkLinkPermission(final long libraryHandle) throws SecurityException
claimAllLinkPermissionback to summary
public final void claimAllLinkPermission() throws SecurityException

Implements com.jogamp.common.os.DynamicLinker.claimAllLinkPermission.

Exceptions
SecurityException:
if user is not granted global access
closeLibraryback to summary
public final void closeLibrary(final long libraryHandle, final boolean debug) throws SecurityException, IllegalArgumentException

Implements com.jogamp.common.os.DynamicLinker.closeLibrary.

Doc from com.jogamp.common.os.DynamicLinker.closeLibrary.

Security checks are implicit by previous call of openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean) retrieving the librarHandle.

Parameters
libraryHandle:long

a library handle previously retrieved via openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean).

debug:boolean

set to true to enable debugging

Annotations
@Override
Exceptions
SecurityException:
if user is not granted access for the given library handle
IllegalArgumentException:
in case case libraryHandle is unknown.
closeLibraryImplback to summary
protected abstract void closeLibraryImpl(final long libraryHandle) throws SecurityException
decrLibRefCountback to summary
private final DynamicLinkerImpl.LibRef decrLibRefCount(final long handle)
getLibRefback to summary
private final DynamicLinkerImpl.LibRef getLibRef(final long handle)
incrLibRefCountback to summary
private final DynamicLinkerImpl.LibRef incrLibRefCount(final long handle, final String libName)
lookupSymbolback to summary
public final long lookupSymbol(final long libraryHandle, final String symbolName) throws SecurityException, IllegalArgumentException

Implements com.jogamp.common.os.DynamicLinker.lookupSymbol.

Doc from com.jogamp.common.os.DynamicLinker.lookupSymbol.

Security checks are implicit by previous call of openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean) retrieving the librarHandle.

Parameters
libraryHandle:long

a library handle previously retrieved via openLibraryLocal(String, boolean) or openLibraryGlobal(String, boolean).

symbolName:String

global symbol name to lookup up system wide.

Returns:long

the library handle, maybe 0 if not found.

Annotations
@Override
Exceptions
SecurityException:
if user is not granted access for the given library handle
IllegalArgumentException:
in case case libraryHandle is unknown.
lookupSymbolGlobalback to summary
public final long lookupSymbolGlobal(final String symbolName) throws SecurityException

Implements com.jogamp.common.os.DynamicLinker.lookupSymbolGlobal.

Doc from com.jogamp.common.os.DynamicLinker.lookupSymbolGlobal.

If a SecurityManager is installed, user needs link permissions for all libraries, i.e. for new RuntimePermission("loadLibrary.*");!

Parameters
symbolName:String

global symbol name to lookup up system wide.

Returns:long

the library handle, maybe 0 if not found.

Annotations
@Override
Exceptions
SecurityException:
if user is not granted access for all libraries.
lookupSymbolGlobalImplback to summary
protected abstract long lookupSymbolGlobalImpl(final String symbolName) throws SecurityException
lookupSymbolLocalImplback to summary
protected abstract long lookupSymbolLocalImpl(final long libraryHandle, final String symbolName) throws SecurityException
openLibraryGlobalback to summary
public final long openLibraryGlobal(final String pathname, final boolean debug) throws SecurityException

Implements com.jogamp.common.os.DynamicLinker.openLibraryGlobal.

Doc from com.jogamp.common.os.DynamicLinker.openLibraryGlobal.

If a SecurityManager is installed, user needs link permissions for the named library.

Opens the named library, allowing system wide access for other users.

Parameters
pathname:String

the full pathname for the library to open

debug:boolean

set to true to enable debugging

Returns:long

the library handle, maybe 0 if not found.

Annotations
@Override
Exceptions
SecurityException:
if user is not granted access for the named library.
openLibraryGlobalImplback to summary
protected abstract long openLibraryGlobalImpl(final String pathname) throws SecurityException
openLibraryLocalback to summary
public final long openLibraryLocal(final String pathname, final boolean debug) throws SecurityException

Implements com.jogamp.common.os.DynamicLinker.openLibraryLocal.

Doc from com.jogamp.common.os.DynamicLinker.openLibraryLocal.

If a SecurityManager is installed, user needs link permissions for the named library.

Opens the named library, restricting access to this process.

Parameters
pathname:String

the full pathname for the library to open

debug:boolean

set to true to enable debugging

Returns:long

the library handle, maybe 0 if not found.

Annotations
@Override
Exceptions
SecurityException:
if user is not granted access for the named library.
openLibraryLocalImplback to summary
protected abstract long openLibraryLocalImpl(final String pathname) throws SecurityException
releaseAllLinkPermissionback to summary
public final void releaseAllLinkPermission() throws SecurityException

Implements com.jogamp.common.os.DynamicLinker.releaseAllLinkPermission.

Exceptions
SecurityException:
if user is not granted global access
jogamp.common.os back to summary

pack-priv final Class DynamicLinkerImpl.LibRef

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private int

Constructor Summary

AccessConstructor and Description
pack-priv
LibRef(final String name)

Method Summary

Modifier and TypeMethod and Description
pack-priv final int
pack-priv final String
pack-priv final int
pack-priv final int
public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private final String name
refCountback to summary
private int refCount

Constructor Detail

LibRefback to summary
pack-priv LibRef(final String name)

Method Detail

decrRefCountback to summary
pack-priv final int decrRefCount()
getNameback to summary
pack-priv final String getName()
getRefCountback to summary
pack-priv final int getRefCount()
incrRefCountback to summary
pack-priv final int incrRefCount()
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override