OSGi Service Platform
Release 4

org.osgi.service.packageadmin
Interface ExportedPackage


public interface ExportedPackage

An exported package. Instances implementing this interface are created by the Package Admin service.

The information about an exported package provided by this object is valid only until the next time PackageAdmin.refreshPackages() is called. If an ExportedPackage object becomes stale (that is, the package it references has been updated or removed as a result of calling PackageAdmin.refreshPackages()), its getName() and getSpecificationVersion() continue to return their old values, isRemovalPending() returns true, and getExportingBundle() and getImportingBundles() return null.

Version:
$Revision: 1.8 $

Method Summary
 Bundle getExportingBundle()
          Returns the bundle exporting the package associated with this ExportedPackage object.
 Bundle[] getImportingBundles()
          Returns the resolved bundles that are currently importing the package associated with this ExportedPackage object.
 java.lang.String getName()
          Returns the name of the package associated with this ExportedPackage object.
 java.lang.String getSpecificationVersion()
          Returns the specification version of this ExportedPackage, as specified in the exporting bundle's manifest file.
 boolean isRemovalPending()
          Returns true if the package associated with this ExportedPackage object has been exported by a bundle that has been updated or uninstalled.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the package associated with this ExportedPackage object.

Returns:
The name of this ExportedPackage object.

getExportingBundle

public Bundle getExportingBundle()
Returns the bundle exporting the package associated with this ExportedPackage object.

Returns:
The exporting bundle, or null if this ExportedPackage object has become stale.

getImportingBundles

public Bundle[] getImportingBundles()
Returns the resolved bundles that are currently importing the package associated with this ExportedPackage object.

Bundles which require the exporting bundle associated with this ExportedPackage object are considered to be importing bundles and are included in the returned array. See RequiredBundle.getRequiringBundles()

Returns:
The array of resolved bundles currently importing the package associated with this ExportedPackage object, or null if this ExportedPackage object has become stale.

getSpecificationVersion

public java.lang.String getSpecificationVersion()
Returns the specification version of this ExportedPackage, as specified in the exporting bundle's manifest file.

Returns:
The specification version of this ExportedPackage object, or null if no version information is available.

isRemovalPending

public boolean isRemovalPending()
Returns true if the package associated with this ExportedPackage object has been exported by a bundle that has been updated or uninstalled.

Returns:
true if the associated package is being exported by a bundle that has been updated or uninstalled, or if this ExportedPackage object has become stale; false otherwise.

OSGi Service Platform
Release 4

Copyright (c) OSGi Alliance (2000, 2005). All Rights Reserved.