Top Description Methods
org.osgi.service.packageadmin

public Interface RequiredBundle

Imports
org.osgi.framework.Bundle, .Version

Deprecated

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

A required bundle. Objects implementing this interface are created by the Package Admin service.

The term required bundle refers to a resolved bundle that has a bundle symbolic name and is not a fragment. That is, a bundle that may be required by other bundles. This bundle may or may not be currently required by other bundles.

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

Author
$Id: 08ab9c1a6f4a9af2060293d2c2972e4e07e2a238 $
Since
1.2

Method Summary

Modifier and TypeMethod and Description
public Bundle

Returns:

The bundle, or null if this RequiredBundle object has become stale.
getBundle
()

Returns the bundle associated with this required bundle.

public Bundle[]

Returns:

An array of bundles currently requiring this required bundle, or null if this RequiredBundle object has become stale. The array will be empty if no bundles require this required package.
getRequiringBundles
()

Returns the bundles that currently require this required bundle.

public String

Returns:

The symbolic name of this required bundle.
getSymbolicName
()

Returns the symbolic name of this required bundle.

public Version

Returns:

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

Returns the version of this required bundle.

public boolean

Returns:

true if the required bundle has been updated or uninstalled, or if the RequiredBundle object has become stale; false otherwise.
isRemovalPending
()

Returns true if the bundle associated with this RequiredBundle object has been updated or uninstalled.

Method Detail

getBundleback to summary
public Bundle getBundle()

Returns the bundle associated with this required bundle.

Returns:Bundle

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

getRequiringBundlesback to summary
public Bundle[] getRequiringBundles()

Returns the bundles that currently require this required bundle.

If this required bundle is required and then re-exported by another bundle then all the requiring bundles of the re-exporting bundle are included in the returned array.

Returns:Bundle[]

An array of bundles currently requiring this required bundle, or null if this RequiredBundle object has become stale. The array will be empty if no bundles require this required package.

getSymbolicNameback to summary
public String getSymbolicName()

Returns the symbolic name of this required bundle.

Returns:String

The symbolic name of this required bundle.

getVersionback to summary
public Version getVersion()

Returns the version of this required bundle.

Returns:Version

The version of this required bundle, or Version#emptyVersion if no version information is available.

isRemovalPendingback to summary
public boolean isRemovalPending()

Returns true if the bundle associated with this RequiredBundle object has been updated or uninstalled.

Returns:boolean

true if the required bundle has been updated or uninstalled, or if the RequiredBundle object has become stale; false otherwise.