Top Description Methods
org.osgi.service.packageadmin

public Interface ExportedPackage

Imports
org.osgi.framework.Bundle, .Version

Deprecated

The PackageAdmin service has been replaced by the org.osgi.framework.wiring package.

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

The term exported package refers to a package that has been exported from a resolved bundle. This package may or may not be currently wired to other bundles.

The information about an exported package provided by this object may change. An ExportedPackage object becomes stale if the package it references has been updated or removed as a result of calling PackageAdmin.refreshPackages(). If this object becomes stale, its getName() and getVersion() methods continue to return their original values, isRemovalPending() returns true, and getExportingBundle() and getImportingBundles() return null.

Author
$Id: e04a2beb3de2afff4cb01747e589c04b5e0f0cc8 $

Method Summary

Modifier and TypeMethod and Description
public Bundle

Returns:

The exporting bundle, or null if this ExportedPackage object has become stale.
getExportingBundle
()

Returns the bundle exporting the package associated with this exported package.

public Bundle[]

Returns:

The array of resolved bundles currently wired to this exported package, or null if this ExportedPackage object has become stale. The array will be empty if no bundles are wired to this exported package.
getImportingBundles
()

Returns the resolved bundles that are currently wired to this exported package.

public String

Returns:

The name of this exported package.
getName
()

Returns the name of the package associated with this exported package.

public String

Returns:

The version of this exported package, or null if no version information is available.
getSpecificationVersion
()
Deprecated As of 1.2, replaced by getVersion().

Returns the version of this exported package.

public Version

Returns:

The version of this exported package, or Version#emptyVersion if no version information is available.
getVersion
()

Returns the version of this exported package.

public boolean

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.
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

getExportingBundleback to summary
public Bundle getExportingBundle()

Returns the bundle exporting the package associated with this exported package.

Returns:Bundle

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

getImportingBundlesback to summary
public Bundle[] getImportingBundles()

Returns the resolved bundles that are currently wired to this exported package.

Bundles which require the exporting bundle associated with this exported package are considered to be wired to this exported package are included in the returned array. See RequiredBundle#getRequiringBundles().

Returns:Bundle[]

The array of resolved bundles currently wired to this exported package, or null if this ExportedPackage object has become stale. The array will be empty if no bundles are wired to this exported package.

getNameback to summary
public String getName()

Returns the name of the package associated with this exported package.

Returns:String

The name of this exported package.

getSpecificationVersionback to summary
public String getSpecificationVersion()

Deprecated

As of 1.2, replaced by getVersion().

Returns the version of this exported package.

Returns:String

The version of this exported package, or null if no version information is available.

getVersionback to summary
public Version getVersion()

Returns the version of this exported package.

Returns:Version

The version of this exported package, or Version#emptyVersion if no version information is available.

Since
1.2
isRemovalPendingback to summary
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:boolean

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.