com.jogamp.common.os
Class DynamicLibraryBundle

java.lang.Object
  extended by com.jogamp.common.os.DynamicLibraryBundle
All Implemented Interfaces:
DynamicLookupHelper

public class DynamicLibraryBundle
extends Object
implements DynamicLookupHelper

Provides bundling of:

An DynamicLibraryBundleInfo instance is being passed in the constructor, providing the required information about the tool and glue libraries. The ClassLoader of it's implementation is also being used to help locating the native libraries.

An instance provides a complete DynamicLookupHelper to reset the ProcAddressTable.
At construction, it:


Field Summary
protected  List<NativeLibrary> nativeLibraries
           
static boolean USE_CURRENT_THREAD_LIBLOADER
           
 
Fields inherited from interface com.jogamp.common.os.DynamicLookupHelper
DEBUG, DEBUG_LOOKUP
 
Constructor Summary
DynamicLibraryBundle(DynamicLibraryBundleInfo info)
          Instantiates and loads all NativeLibrarys incl.
 
Method Summary
 void destroy()
          Unload all NativeLibrarys, and remove all references.
 long dynamicLookupFunction(String funcName)
          Try to fetch the function pointer for function 'funcName'.
 DynamicLibraryBundleInfo getBundleInfo()
           
static RunnableExecutor getDefaultRunnableExecutor()
          Returns an AWT-EDT RunnableExecutor implementation if AWT is available, otherwise RunnableExecutor.currentThreadExecutor.
 int getGlueLibLoadedNumber()
           
 int getGlueLibNumber()
           
protected  long getToolGetProcAddressHandle()
           
 int getToolLibLoadedNumber()
           
 int getToolLibNumber()
           
 boolean isGlueLibComplete()
           
 boolean isGlueLibLoaded(int i)
           
 boolean isLibComplete()
           
 boolean isToolLibComplete()
           
 boolean isToolLibLoaded()
           
 boolean isToolLibLoaded(int i)
           
protected  NativeLibrary loadFirstAvailable(List<String> libNames, ClassLoader loader, boolean global)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_CURRENT_THREAD_LIBLOADER

public static final boolean USE_CURRENT_THREAD_LIBLOADER

nativeLibraries

protected List<NativeLibrary> nativeLibraries
Constructor Detail

DynamicLibraryBundle

public DynamicLibraryBundle(DynamicLibraryBundleInfo info)
Instantiates and loads all NativeLibrarys incl. JNI libraries.

The ClassLoader of the DynamicLibraryBundleInfo implementation class is being used to help locating the native libraries.

Method Detail

getDefaultRunnableExecutor

public static RunnableExecutor getDefaultRunnableExecutor()
Returns an AWT-EDT RunnableExecutor implementation if AWT is available, otherwise RunnableExecutor.currentThreadExecutor.


destroy

public void destroy()
Unload all NativeLibrarys, and remove all references.


isLibComplete

public final boolean isLibComplete()

getToolLibNumber

public final int getToolLibNumber()

getToolLibLoadedNumber

public final int getToolLibLoadedNumber()

isToolLibComplete

public final boolean isToolLibComplete()
Returns:
true if all tool libraries are loaded, otherwise false.
See Also:
DynamicLibraryBundleInfo.getToolLibNames()

isToolLibLoaded

public final boolean isToolLibLoaded()

isToolLibLoaded

public final boolean isToolLibLoaded(int i)

getGlueLibNumber

public final int getGlueLibNumber()

getGlueLibLoadedNumber

public final int getGlueLibLoadedNumber()

isGlueLibComplete

public final boolean isGlueLibComplete()
Returns:
true if the last entry has been loaded, while ignoring the preload dependencies. Otherwise false.
See Also:
DynamicLibraryBundleInfo.getGlueLibNames()

isGlueLibLoaded

public final boolean isGlueLibLoaded(int i)

getBundleInfo

public final DynamicLibraryBundleInfo getBundleInfo()

getToolGetProcAddressHandle

protected long getToolGetProcAddressHandle()

loadFirstAvailable

protected NativeLibrary loadFirstAvailable(List<String> libNames,
                                           ClassLoader loader,
                                           boolean global)

dynamicLookupFunction

public long dynamicLookupFunction(String funcName)
Description copied from interface: DynamicLookupHelper
Try to fetch the function pointer for function 'funcName'.

Specified by:
dynamicLookupFunction in interface DynamicLookupHelper