org.knopflerfish.framework.BundleImpl Class Reference

Inheritance diagram for org.knopflerfish.framework.BundleImpl:

org.osgi.framework.Bundle org.knopflerfish.framework.SystemBundle

List of all members.


Detailed Description

Implementation of the Bundle object.

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

Philippe Laporte

Mats-Ola Persson

Definition at line 66 of file BundleImpl.java.


Public Member Functions

int getState ()
 Get bundle state.
synchronized void start () throws BundleException
 Start this bundle.
synchronized void stop () throws BundleException
 Stop this bundle.
void update () throws BundleException
 Update this bundle.
synchronized void update (final InputStream in) throws BundleException
 Update this bundle.
synchronized void uninstall () throws BundleException
 Uninstall this bundle.
Dictionary getHeaders ()
 Get header data.
long getBundleId ()
 Get bundle identifier.
String getLocation ()
 Get bundle location.
ServiceReference[] getRegisteredServices ()
 Get services that this bundle has registrated.
ServiceReference[] getServicesInUse ()
 Get services that this bundle uses.
boolean hasPermission (Object permission)
 Determine whether the bundle has the requested permission.
URL getResource (String name)
 
See also:
org.osgi.framework.Bundle.getResource(String name)

String getSymbolicName ()
 
See also:
org.osgi.framework.Bundle.getSymbolicName()

String toString ()
 Return a string representing this bundle.
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.
Dictionary getHeaders (String locale)
 
See also:
org.osgi.framework.Bundle.getHeaders(String locale)

long getLastModified ()
 
See also:
org.osgi.framework.Bundle.getLastModified()

Enumeration getResources (String name) throws IOException
 
See also:
org.osgi.framework.Bundle.getResources(String name)

Class loadClass (final String name) throws ClassNotFoundException
 
See also:
org.osgi.framework.Bundle.loadClass()


Protected Member Functions

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

Protected Attributes

FileTree bundleDir = null
 Directory for bundle data.
BundleContextImpl bundleContext = null
 BundleContext for bundle.
BundleActivator bactivator = null
 BundleActivator for bundle.
long lastModified
 Time when bundle was last modified.

Package Functions

 BundleImpl (Framework fw, long id, String loc, ProtectionDomain pd, String sym, Version ver)
 Construct a new Bundle empty.
 BundleImpl (Framework fw, BundleArchive ba)
 Construct a new Bundle based on a BundleArchive.
boolean allowSetStartOnLaunchFalse ()
 Check if setStartOnLaunch(false) is allowed.
int getUpdatedState ()
 Get updated bundle state.
boolean resolveFragment (BundleImpl host)
 Resolve fragment.
File getDataRoot ()
 Get root for persistent storage area for this bundle.
ClassLoader getClassLoader ()
 Get class loader for this bundle.
synchronized void setStateInstalled (boolean sendEvent)
 Set state to INSTALLED and throw away our classloader.
ClassLoader getClassLoader (BundlePackages ebpkgs)
 Get the BundleClassLoader object for one of our BundlePackages.
void purge ()
 Purge any old files associated with this bundle.
BundleArchive getBundleArchive (long gen, long frag)
 Get bundle archive.
Iterator getExports ()
 Get exported packages.
Iterator getImports ()
 Get imported packages.
URL getURL (long gen, long frag, int bcpElem, String path)
 Construct URL to bundle resource.
void startOnLaunch (boolean value)
 Save the start on launch flag to the persistent bundle storage.
void doExportImport ()
 Look at our manifest and register all our import and export packages.
boolean isFragment ()
 Checks if this bundle is a fragment.
boolean isExtension ()
 Checks if this bundle is an extension bundle.
boolean extensionNeedsRestart ()
 Checks if this bundle is an extension bundle that is updated/uninstalled and needs to be restarted.
boolean isBootClassPathExtension ()
 Checks if this bundle is a boot class path extension bundle.
boolean isFrameworkExtension ()
 Checks if this bundle is a framework extension bundle.
boolean isAttached ()
 Checks if this bundle is attached to a fragment host.
String getFragmentHostName ()
 Returns the name of the bundle's fragment host.
BundleImpl getFragmentHost ()
 Returns the attached fragment host OR the most suitable.
boolean isFragmentHost ()
 Determines whether this bundle is a fragment host or not.
void attachFragments ()
 Attaches all relevant fragments to this bundle.
void attachFragment (BundleImpl fragmentBundle)
 Attaches a fragment to this bundle.
Iterator getFragments ()
 Returns a iterator over all attached fragments.

Package Attributes

final Framework framework
 Framework for bundle.
final PermissionOps secure
 Handle to secure operations.
final long id
 Bundle identifier.
final String location
 Bundle location identifier.
boolean v2Manifest
 Does bundle have a version 2 manifest.
String symbolicName
 Bundle symbolic name.
boolean singleton
 Bundle is a singleton.
Version version
 Bundle version.
int state
 State of bundle.
BundlePackages bpkgs
 Packages that the bundle wants to export and import.
BundleArchive archive
 Bundle JAR data.
int generation = 0
 Generation of BundlePackages.
boolean bDelayedStart = false
 Set to true of bundle.start() has been called but current start levels was too low to actually start the bundle.
ArrayList fragments = null
 All fragment bundles this bundle hosts.
String attachPolicy
 This bundle's fragment attach policy.
Fragment fragment = null
 Fragment description.

Static Package Attributes

static int RESOLVED_FLAGS = RESOLVED | STARTING | ACTIVE | STOPPING
 Union of flags allowing bundle package access.

Classes

class  Fragment

Constructor & Destructor Documentation

org.knopflerfish.framework.BundleImpl.BundleImpl ( Framework  fw,
long  id,
String  loc,
ProtectionDomain  pd,
String  sym,
Version  ver 
) [package]

Construct a new Bundle empty.

Only called for system bundle

Parameters:
fw Framework for this bundle.

Definition at line 212 of file BundleImpl.java.

References org.knopflerfish.framework.Framework.perm.

org.knopflerfish.framework.BundleImpl.BundleImpl ( Framework  fw,
BundleArchive  ba 
) [package]

Construct a new Bundle based on a BundleArchive.

Parameters:
bundlesDir Directory where to store the bundles all persistent data.
fw Framework for this bundle.
loc Location for new bundle.
in Bundle JAR as an inputstream.
Exceptions:
IOException If we fail to read and store our JAR bundle or if the input data is corrupted.
SecurityException If we don't have permission to import and export bundle packages.

Definition at line 238 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.BundleImpl.bundleDir, org.knopflerfish.framework.BundleImpl.doExportImport(), org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.BundleArchive.getBundleId(), org.knopflerfish.framework.BundleArchive.getBundleLocation(), org.knopflerfish.framework.Framework.getDataStorage(), org.knopflerfish.framework.StartLevelImpl.getInitialBundleStartLevel(), org.knopflerfish.framework.BundleArchive.getLastModified(), org.knopflerfish.framework.PermissionOps.getProtectionDomain(), org.knopflerfish.framework.BundleArchive.getStartLevel(), org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.BundleImpl.isExtension(), org.knopflerfish.framework.BundleImpl.lastModified, org.knopflerfish.framework.BundleImpl.location, org.knopflerfish.framework.Framework.perm, org.osgi.framework.Bundle.RESOLVED, org.knopflerfish.framework.BundleImpl.resolveFragment(), org.knopflerfish.framework.BundleImpl.secure, org.knopflerfish.framework.BundleArchive.setStartLevel(), org.knopflerfish.framework.Framework.startLevelService, org.knopflerfish.framework.BundleImpl.state, and org.knopflerfish.framework.Framework.systemBundle.


Member Function Documentation

int org.knopflerfish.framework.BundleImpl.getState (  ) 

Get bundle state.

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

Implements org.osgi.framework.Bundle.

Definition at line 285 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.state.

Referenced by org.knopflerfish.framework.Bundles.getActiveBundles().

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

Start this bundle.

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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 295 of file BundleImpl.java.

References org.osgi.framework.Bundle.ACTIVE, org.knopflerfish.framework.Framework.active, org.knopflerfish.framework.BundleImpl.bDelayedStart, org.knopflerfish.framework.BundleImpl.bpkgs, org.knopflerfish.framework.Listeners.bundleChanged(), org.knopflerfish.framework.BundleImpl.bundleContext, org.knopflerfish.framework.PermissionOps.callSetPersistent(), org.knopflerfish.framework.PermissionOps.callStart0(), org.knopflerfish.framework.PermissionOps.checkExecuteAdminPerm(), org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.BundlePackages.getResolveFailReason(), org.knopflerfish.framework.StartLevelImpl.getStartLevel(), org.knopflerfish.framework.BundleImpl.getUpdatedState(), org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.BundleContextImpl.invalidate(), org.knopflerfish.framework.BundleImpl.isFragment(), org.knopflerfish.framework.Framework.listeners, org.osgi.framework.Bundle.RESOLVED, org.knopflerfish.framework.BundleImpl.secure, org.osgi.framework.Bundle.STARTING, org.knopflerfish.framework.Framework.startLevelService, org.knopflerfish.framework.BundleImpl.startOnLaunch(), org.knopflerfish.framework.BundleImpl.state, org.osgi.framework.Bundle.STOPPING, and org.osgi.framework.Bundle.UNINSTALLED.

Referenced by org.knopflerfish.framework.Bundles.startBundles().

synchronized void org.knopflerfish.framework.BundleImpl.stop (  )  throws BundleException

Stop this bundle.

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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 441 of file BundleImpl.java.

References org.osgi.framework.Bundle.ACTIVE, org.knopflerfish.framework.BundleImpl.allowSetStartOnLaunchFalse(), org.knopflerfish.framework.BundleImpl.bDelayedStart, org.knopflerfish.framework.PermissionOps.callSetPersistent(), org.knopflerfish.framework.PermissionOps.callStartOnLaunch(), org.knopflerfish.framework.PermissionOps.callStop0(), org.knopflerfish.framework.PermissionOps.checkExecuteAdminPerm(), org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.BundleImpl.isFragment(), org.osgi.framework.Bundle.RESOLVED, org.knopflerfish.framework.BundleImpl.secure, org.osgi.framework.Bundle.STARTING, org.knopflerfish.framework.BundleImpl.state, org.osgi.framework.Bundle.STOPPING, and org.osgi.framework.Bundle.UNINSTALLED.

Referenced by org.knopflerfish.framework.BundleImpl.update().

void org.knopflerfish.framework.BundleImpl.update (  )  throws BundleException

Update this bundle.

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

Implements org.osgi.framework.Bundle.

Definition at line 515 of file BundleImpl.java.

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

Update this bundle.

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

Definition at line 525 of file BundleImpl.java.

References org.osgi.framework.Bundle.ACTIVE, org.knopflerfish.framework.PermissionOps.callUpdate0(), org.knopflerfish.framework.PermissionOps.checkExtensionLifecycleAdminPerm(), org.knopflerfish.framework.PermissionOps.checkLifecycleAdminPerm(), org.knopflerfish.framework.BundleImpl.getUpdatedState(), org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.BundleImpl.isExtension(), org.osgi.framework.Bundle.RESOLVED, org.knopflerfish.framework.BundleImpl.secure, org.osgi.framework.Bundle.STARTING, org.knopflerfish.framework.BundleImpl.state, org.knopflerfish.framework.BundleImpl.stop(), org.osgi.framework.Bundle.STOPPING, and org.osgi.framework.Bundle.UNINSTALLED.

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

Uninstall this bundle.

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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 688 of file BundleImpl.java.

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

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

Get header data.

This is all entries in the bundles MANIFEST file.

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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 794 of file BundleImpl.java.

long org.knopflerfish.framework.BundleImpl.getBundleId (  ) 

Get bundle identifier.

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

Implements org.osgi.framework.Bundle.

Definition at line 804 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.id.

Referenced by org.knopflerfish.framework.Packages.getZombieAffected().

String org.knopflerfish.framework.BundleImpl.getLocation (  ) 

Get bundle location.

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

Implements org.osgi.framework.Bundle.

Definition at line 814 of file BundleImpl.java.

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

ServiceReference [] org.knopflerfish.framework.BundleImpl.getRegisteredServices (  ) 

Get services that this bundle has registrated.

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

Implements org.osgi.framework.Bundle.

Definition at line 825 of file BundleImpl.java.

References org.knopflerfish.framework.PermissionOps.filterGetServicePermission(), org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.Services.getRegisteredByBundle(), org.knopflerfish.framework.BundleImpl.secure, and org.knopflerfish.framework.Framework.services.

ServiceReference [] org.knopflerfish.framework.BundleImpl.getServicesInUse (  ) 

Get services that this bundle uses.

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

Implements org.osgi.framework.Bundle.

Definition at line 842 of file BundleImpl.java.

References org.knopflerfish.framework.PermissionOps.filterGetServicePermission(), org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.Services.getUsedByBundle(), org.knopflerfish.framework.BundleImpl.secure, and org.knopflerfish.framework.Framework.services.

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

Determine whether the bundle has the requested permission.

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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 859 of file BundleImpl.java.

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

int org.knopflerfish.framework.BundleImpl.getUpdatedState (  )  [package]

Get updated bundle state.

That means check if an installed bundle has been resolved.

Returns:
Bundles state

Definition at line 919 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.BundleImpl.attachFragments(), org.knopflerfish.framework.BundleImpl.bpkgs, org.knopflerfish.framework.Listeners.bundleChanged(), org.knopflerfish.framework.BundleImpl.fragments, org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.Listeners.frameworkInfo(), org.knopflerfish.framework.BundleArchive.getFailedClassPathEntries(), org.knopflerfish.framework.BundleImpl.getFragmentHost(), org.knopflerfish.framework.BundleImpl.getUpdatedState(), org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.BundleImpl.isFragment(), org.knopflerfish.framework.Framework.listeners, org.osgi.framework.Bundle.RESOLVED, org.knopflerfish.framework.BundlePackages.resolvePackages(), and org.knopflerfish.framework.BundleImpl.state.

Referenced by org.knopflerfish.framework.BundleImpl.findEntries(), org.knopflerfish.framework.BundleImpl.getResource(), org.knopflerfish.framework.BundleImpl.getResources(), org.knopflerfish.framework.BundleImpl.getUpdatedState(), org.knopflerfish.framework.BundleImpl.loadClass(), org.knopflerfish.framework.PackageAdminImpl.resolveBundles(), org.knopflerfish.framework.BundleImpl.start(), org.knopflerfish.framework.Bundles.startBundles(), and org.knopflerfish.framework.BundleImpl.update().

File org.knopflerfish.framework.BundleImpl.getDataRoot (  )  [package]

Get root for persistent storage area for this bundle.

Returns:
A File object representing the data root.

Definition at line 993 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.bundleDir.

Referenced by org.knopflerfish.framework.BundleContextImpl.getDataFile().

ClassLoader org.knopflerfish.framework.BundleImpl.getClassLoader (  )  [package]

Get class loader for this bundle.

Create the classloader if we haven't done this previously. This method can only be called when the bundle is resolved.

Returns:
Bundles classloader.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 1005 of file BundleImpl.java.

References org.knopflerfish.framework.PermissionOps.callGetClassLoader0(), org.knopflerfish.framework.BundleImpl.RESOLVED_FLAGS, org.knopflerfish.framework.BundleImpl.secure, and org.knopflerfish.framework.BundleImpl.state.

Referenced by org.knopflerfish.framework.BundleImpl.getBundleArchive(), org.knopflerfish.framework.BundlePackages.getClassLoader(), org.knopflerfish.framework.BundleImpl.getClassLoader(), org.knopflerfish.framework.BundleImpl.getResource(), org.knopflerfish.framework.BundleImpl.getResources(), org.knopflerfish.framework.ServiceReferenceImpl.getService(), org.knopflerfish.framework.BundleImpl.loadClass(), and org.knopflerfish.framework.BundleImpl.readLocalization().

synchronized void org.knopflerfish.framework.BundleImpl.setStateInstalled ( boolean  sendEvent  )  [package]

Set state to INSTALLED and throw away our classloader.

Reset all package registration. We assume that the bundle is resolved when entering this method.

Definition at line 1051 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.bpkgs, org.knopflerfish.framework.Listeners.bundleChanged(), org.knopflerfish.framework.BundleImpl.fragment, org.knopflerfish.framework.BundleImpl.framework, org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.BundleImpl.isFragment(), org.knopflerfish.framework.BundleImpl.isFragmentHost(), org.knopflerfish.framework.Framework.listeners, org.knopflerfish.framework.BundlePackages.registerPackages(), org.knopflerfish.framework.BundleImpl.state, and org.knopflerfish.framework.BundlePackages.unregisterPackages().

ClassLoader org.knopflerfish.framework.BundleImpl.getClassLoader ( BundlePackages  ebpkgs  )  [package]

Get the BundleClassLoader object for one of our BundlePackages.

Parameters:
ebpkgs BundlePackages to get class loader for.
Returns:
BundleClassLoader object for specified pkg, null if no classloader.

Definition at line 1080 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.bpkgs, and org.knopflerfish.framework.BundleImpl.getClassLoader().

BundleArchive org.knopflerfish.framework.BundleImpl.getBundleArchive ( long  gen,
long  frag 
) [package]

Get bundle archive.

Returns:
BundleArchive object.

Definition at line 1112 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.BundleImpl.bpkgs, org.knopflerfish.framework.BundlePackages.generation, org.knopflerfish.framework.BundleClassLoader.getBpkgs(), org.knopflerfish.framework.BundleClassLoader.getBundleArchive(), and org.knopflerfish.framework.BundleImpl.getClassLoader().

Iterator org.knopflerfish.framework.BundleImpl.getExports (  )  [package]

Get exported packages.

Returns:
Iterator of all exported packages as ExportPkg.

Definition at line 1137 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.bpkgs, and org.knopflerfish.framework.BundlePackages.getExports().

Referenced by org.knopflerfish.framework.Packages.getZombieAffected().

Iterator org.knopflerfish.framework.BundleImpl.getImports (  )  [package]

Get imported packages.

Returns:
Iterator of all imported packages as ImportPkg.

Definition at line 1164 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.bpkgs, and org.knopflerfish.framework.BundlePackages.getImports().

void org.knopflerfish.framework.BundleImpl.startOnLaunch ( boolean  value  )  [package]

Save the start on launch flag to the persistent bundle storage.

Parameters:
value Boolean state for start on launch flag.

Definition at line 1344 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.Listeners.frameworkError(), org.knopflerfish.framework.Framework.listeners, and org.knopflerfish.framework.BundleArchive.setStartOnLaunchFlag().

Referenced by org.knopflerfish.framework.BundleImpl.start().

String org.knopflerfish.framework.BundleImpl.toString (  ) 

Return a string representing this bundle.

Only return identifier, since it requires AdminPermisson to get the location.

Returns:
a String representing this bundle.

Definition at line 1468 of file BundleImpl.java.

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

Get bundle data.

Get resources from bundle or fragment jars.

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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 1515 of file BundleImpl.java.

References org.knopflerfish.framework.Framework.bundles, org.knopflerfish.framework.PermissionOps.callFindEntries0(), org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.Bundles.getFragmentBundles(), org.knopflerfish.framework.BundleImpl.getUpdatedState(), org.osgi.framework.Bundle.INSTALLED, org.knopflerfish.framework.PermissionOps.okResourceAdminPerm(), org.knopflerfish.framework.BundleImpl.secure, and org.knopflerfish.framework.BundleImpl.state.

URL org.knopflerfish.framework.BundleImpl.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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 1575 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.PermissionOps.callGetInputStream(), org.knopflerfish.framework.BundleImpl.getURL(), org.knopflerfish.framework.PermissionOps.okResourceAdminPerm(), and org.knopflerfish.framework.BundleImpl.secure.

Enumeration org.knopflerfish.framework.BundleImpl.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

Implements org.osgi.framework.Bundle.

Reimplemented in org.knopflerfish.framework.SystemBundle.

Definition at line 1593 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.PermissionOps.callFindResourcesPath(), org.knopflerfish.framework.PermissionOps.okResourceAdminPerm(), and org.knopflerfish.framework.BundleImpl.secure.

void org.knopflerfish.framework.BundleImpl.readLocalization ( String  locale,
Hashtable  localization_entries,
String  baseName 
) [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 1662 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.archive, org.knopflerfish.framework.BundleImpl.getClassLoader(), org.knopflerfish.framework.BundleArchive.getLocalizationEntries(), org.knopflerfish.framework.BundleImpl.RESOLVED_FLAGS, and org.knopflerfish.framework.BundleImpl.state.

String org.knopflerfish.framework.BundleImpl.getFragmentHostName (  )  [package]

Returns the name of the bundle's fragment host.

Returns null if this is not a fragment.

Definition at line 1862 of file BundleImpl.java.

References org.knopflerfish.framework.BundleImpl.fragment, and org.knopflerfish.framework.BundleImpl.isFragment().


Member Data Documentation

int org.knopflerfish.framework.BundleImpl.RESOLVED_FLAGS = RESOLVED | STARTING | ACTIVE | STOPPING [static, package]

Union of flags allowing bundle package access.

Value is Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING

Definition at line 74 of file BundleImpl.java.

Referenced by org.knopflerfish.framework.BundleImpl.attachFragment(), org.knopflerfish.framework.BundleImpl.getClassLoader(), and org.knopflerfish.framework.BundleImpl.readLocalization().

Fragment org.knopflerfish.framework.BundleImpl.fragment = null [package]

Fragment description.

This is null when the bundle isn't a fragment bundle.

Definition at line 192 of file BundleImpl.java.

Referenced by org.knopflerfish.framework.BundleImpl.getFragmentHost(), org.knopflerfish.framework.BundleImpl.getFragmentHostName(), org.knopflerfish.framework.BundleImpl.isAttached(), org.knopflerfish.framework.BundleImpl.isBootClassPathExtension(), org.knopflerfish.framework.BundleImpl.isExtension(), org.knopflerfish.framework.BundleImpl.isFragment(), org.knopflerfish.framework.BundleImpl.isFrameworkExtension(), org.knopflerfish.framework.BundleImpl.resolveFragment(), and org.knopflerfish.framework.BundleImpl.setStateInstalled().


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