org.eclipse.osgi.internal.baseadaptor
Class SystemBundleData

java.lang.Object
  extended by org.eclipse.osgi.baseadaptor.BaseData
      extended by org.eclipse.osgi.internal.baseadaptor.SystemBundleData
All Implemented Interfaces:
BundleData, BundleReference

public class SystemBundleData
extends BaseData


Field Summary
 
Fields inherited from class org.eclipse.osgi.baseadaptor.BaseData
bundleFile, fileName, loadedNativeCode, manifest
 
Fields inherited from interface org.eclipse.osgi.framework.adaptor.BundleData
TYPE_BOOTCLASSPATH_EXTENSION, TYPE_COMPOSITEBUNDLE, TYPE_EXTCLASSPATH_EXTENSION, TYPE_FRAGMENT, TYPE_FRAMEWORK_EXTENSION, TYPE_SINGLETON, TYPE_SURROGATEBUNDLE
 
Constructor Summary
SystemBundleData(BaseAdaptor adaptor)
           
 
Method Summary
 BundleClassLoader createClassLoader(ClassLoaderDelegate delegate, BundleProtectionDomain domain, String[] bundleclasspath)
          This method calls all the configured class loading hooks ClassLoadingHook.createClassLoader(ClassLoader, ClassLoaderDelegate, BundleProtectionDomain, BaseData, String[]) methods until on returns a non-null value.
 File createGenerationDir()
           
 String findLibrary(String libname)
          This method calls each configured classloading hook ClassLoadingHook.findLibrary(BaseData, String) method until the first one returns a non-null value.
 int getStartLevel()
          Returns the start level metadata for this BundleData.
 int getStatus()
          Returns the status metadata for this BundleData.
 void installNativeCode(String[] nativepaths)
          Installs the native code paths for this BundleData.
 void save()
          Persistently stores all the metadata for this BundleData
 
Methods inherited from class org.eclipse.osgi.baseadaptor.BaseData
close, findLocalResources, getActivator, getAdaptor, getBundle, getBundleFile, getBundleFile, getBundleID, getClassPath, getClassPathString, getDataFile, getDynamicImports, getEntry, getEntryPaths, getExecutionEnvironment, getExtractFile, getLastModified, getLocation, getManifest, getStorageHook, getStorageHooks, getSymbolicName, getType, getVersion, isDirty, open, setActivator, setBundle, setBundleFile, setClassPathString, setDirty, setDynamicImports, setExecutionEnvironment, setFileName, setLastModified, setLocation, setStartLevel, setStatus, setStorageHooks, setSymbolicName, setType, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemBundleData

public SystemBundleData(BaseAdaptor adaptor)
                 throws BundleException
Throws:
BundleException
Method Detail

createClassLoader

public BundleClassLoader createClassLoader(ClassLoaderDelegate delegate,
                                           BundleProtectionDomain domain,
                                           String[] bundleclasspath)
Description copied from class: BaseData
This method calls all the configured class loading hooks ClassLoadingHook.createClassLoader(ClassLoader, ClassLoaderDelegate, BundleProtectionDomain, BaseData, String[]) methods until on returns a non-null value. If none of the class loading hooks returns a non-null value then the default classloader implementation is used.

Specified by:
createClassLoader in interface BundleData
Overrides:
createClassLoader in class BaseData
Parameters:
delegate - The ClassLoaderDelegate to delegate to.
domain - The BundleProtectionDomain to use when defining a class.
bundleclasspath - An array of bundle classpaths to use to create this classloader. This is specified by the Bundle-ClassPath manifest entry.
Returns:
The new ClassLoader for the BundleData.
See Also:
BundleData.createClassLoader(ClassLoaderDelegate, BundleProtectionDomain, String[])

createGenerationDir

public File createGenerationDir()

findLibrary

public String findLibrary(String libname)
Description copied from class: BaseData
This method calls each configured classloading hook ClassLoadingHook.findLibrary(BaseData, String) method until the first one returns a non-null value.

Specified by:
findLibrary in interface BundleData
Overrides:
findLibrary in class BaseData
Parameters:
libname - The name of the library to find the absolute path to.
Returns:
The absolute path name of the native library or null if the library does not exist.
See Also:
BundleData.findLibrary(String)

installNativeCode

public void installNativeCode(String[] nativepaths)
                       throws BundleException
Description copied from interface: BundleData
Installs the native code paths for this BundleData. Each element of nativepaths must be installed for lookup when findLibrary is called.

Specified by:
installNativeCode in interface BundleData
Overrides:
installNativeCode in class BaseData
Parameters:
nativepaths - The array of native code paths to install for the bundle.
Throws:
BundleException

getStartLevel

public int getStartLevel()
Description copied from interface: BundleData
Returns the start level metadata for this BundleData.

Specified by:
getStartLevel in interface BundleData
Overrides:
getStartLevel in class BaseData
Returns:
the start level metadata for this BundleData.

getStatus

public int getStatus()
Description copied from interface: BundleData
Returns the status metadata for this BundleData. A value of 1 indicates that this bundle is started persistently. A value of 0 indicates that this bundle is not started persistently.

Specified by:
getStatus in interface BundleData
Overrides:
getStatus in class BaseData
Returns:
the status metadata for this BundleData.

save

public void save()
Description copied from interface: BundleData
Persistently stores all the metadata for this BundleData

Specified by:
save in interface BundleData
Overrides:
save in class BaseData


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.