org.knopflerfish.framework.SystemBundle Class Reference

Inheritance diagram for org.knopflerfish.framework.SystemBundle:

org.knopflerfish.framework.BundleImpl org.osgi.framework.Bundle

List of all members.


Detailed Description

Implementation of the System Bundle object.

See also:
org.osgi.framework.Bundle
Author:
Jan Stein

Philippe Laporte

Mats-Ola Persson

Definition at line 60 of file SystemBundle.java.


Public Member Functions

boolean hasPermission (Object permission)
 Determine whether the bundle has the requested permission.
synchronized void start () throws BundleException
 Start this bundle.
void stop () throws BundleException
 Stop this bundle.
synchronized void update (InputStream in) throws BundleException
 Update this bundle.
synchronized void uninstall () throws BundleException
 Uninstall this bundle.
Dictionary getHeaders ()
 Get header data.
Dictionary getHeaders (String locale)
 
See also:
org.osgi.framework.Bundle.getHeaders(String locale)

Enumeration findEntries (String path, String filePattern, boolean recurse)
 Get bundle data.
URL getEntry (String name)
 Returns a URL to the specified entry in this bundle.
Enumeration getEntryPaths (String path)
 Returns an Enumeration of all the paths (String objects) to entries within the bundle whose longest sub-path matches the supplied path argument.

Protected Member Functions

void readLocalization (String locale, Hashtable localization_entries)
 Reads all localization entries that affects this bundle (including its host/fragments).

Package Functions

 SystemBundle (Framework fw, ProtectionDomain pd)
 Construct the System Bundle handle.
void addSystemPackages (StringBuffer sp)
 Add all built-in system packages to a stringbuffer.
void addSysPackagesFromFile (StringBuffer sp, String sysPkgFile)
 Read a file with package names and add them to a stringbuffer.
ClassLoader getClassLoader ()
 Get class loader for this bundle.
void systemActive ()
 Set system bundle state to active.
void systemShuttingdown ()
 Set system bundle state to stopping.
void attachFragment (BundleImpl extension)
 Adds an bundle as an extension that will be included in the boot class path on restart.

Member Function Documentation

boolean org.knopflerfish.framework.SystemBundle.hasPermission ( Object  permission  ) 

Determine whether the bundle has the requested permission.

See also:
org.osgi.framework.Bundle.hasPermission

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 206 of file SystemBundle.java.

synchronized void org.knopflerfish.framework.SystemBundle.start (  )  throws BundleException

Start this bundle.

See also:
org.osgi.framework.Bundle.start

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 220 of file SystemBundle.java.

References org.knopflerfish.framework.PermissionOps.checkExecuteAdminPerm(), and org.knopflerfish.framework.BundleImpl.secure.

void org.knopflerfish.framework.SystemBundle.stop (  )  throws BundleException

Stop this bundle.

See also:
org.osgi.framework.Bundle.stop

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 231 of file SystemBundle.java.

Referenced by org.knopflerfish.framework.PackageAdminImpl.refreshPackages().

synchronized void org.knopflerfish.framework.SystemBundle.update ( InputStream  in  )  throws BundleException

Update this bundle.

See also:
org.osgi.framework.Bundle.update

Implements org.osgi.framework.Bundle.

Definition at line 247 of file SystemBundle.java.

References org.knopflerfish.framework.PermissionOps.callMainRestart(), org.knopflerfish.framework.PermissionOps.checkLifecycleAdminPerm(), and org.knopflerfish.framework.BundleImpl.secure.

synchronized void org.knopflerfish.framework.SystemBundle.uninstall (  )  throws BundleException

Uninstall this bundle.

See also:
org.osgi.framework.Bundle.uninstall

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 258 of file SystemBundle.java.

References org.knopflerfish.framework.PermissionOps.checkLifecycleAdminPerm(), and org.knopflerfish.framework.BundleImpl.secure.

Dictionary org.knopflerfish.framework.SystemBundle.getHeaders (  ) 

Get header data.

Simulate EXPORT-PACKAGE.

See also:
org.osgi.framework.Bundle.getHeaders

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 269 of file SystemBundle.java.

Enumeration org.knopflerfish.framework.SystemBundle.findEntries ( String  path,
String  filePattern,
boolean  recurse 
)

Get bundle data.

Get resources from bundle or fragment jars.

See also:
org.osgi.framework.Bundle.findEntries

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 287 of file SystemBundle.java.

URL org.knopflerfish.framework.SystemBundle.getEntry ( String  name  ) 

Returns a URL to the specified entry in this bundle.

The bundle's classloader is not used to search for the specified entry. Only the contents of the bundle is searched for the specified entry. A specified path of "/" indicates the root of the bundle.

Parameters:
name The name of the entry. See java.lang.ClassLoader.getResource for a description of the format of a resource name.
Returns:
A URL to the specified entry, or null if no entry could be found or if the caller does not have the appropriate AdminPermission[this,RESOURCE] and the Java Runtime Environment supports permissions.
Exceptions:
java.lang.IllegalStateException If this bundle has been uninstalled.
Since:
1.3

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 295 of file SystemBundle.java.

Enumeration org.knopflerfish.framework.SystemBundle.getEntryPaths ( String  path  ) 

Returns an Enumeration of all the paths (String objects) to entries within the bundle whose longest sub-path matches the supplied path argument.

The bundle's classloader is not used to search for entries. Only the contents of the bundle is searched. A specified path of "/" indicates the root of the bundle.

Returned paths indicating subdirectory paths end with a "/". The returned paths are all relative to the root of the bundle.

Parameters:
path The path name for which to return entry paths.
Returns:
An Enumeration of the entry paths (String objects) or null if no entry could be found or if the caller does not have the appropriate AdminPermission[this,RESOURCE] and the Java Runtime Environment supports permissions.
Exceptions:
java.lang.IllegalStateException If this bundle has been uninstalled.
Since:
1.3

Reimplemented from org.knopflerfish.framework.BundleImpl.

Definition at line 303 of file SystemBundle.java.

void org.knopflerfish.framework.SystemBundle.readLocalization ( String  locale,
Hashtable  localization_entries 
) [protected]

Reads all localization entries that affects this bundle (including its host/fragments).

Parameters:
locale locale == "" the bundle.properties will be read o/w it will read the files as described in the spec.
localization_entries will append the new entries to this dictionary

Definition at line 380 of file SystemBundle.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.BundleImpl.fragments, and org.knopflerfish.framework.BundleArchive.getLocalizationEntries().


The documentation for this class was generated from the following file:
Generated on Mon Jan 11 21:19:19 2010 for OpenMobileIS by  doxygen 1.5.4