OSGi Service Platform
Release 4

org.osgi.service.packageadmin
Interface RequiredBundle


public interface RequiredBundle

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

The information about a RequiredBundle provided by this object is valid only until the next time PackageAdmin.refreshPackages() called. If a RequiredBundle object becomes stale (that is, the bundle it references has been updated or removed as a result of calling PackageAdmin.refreshPackages()), its getSymbolicName() and getVersion() continue to return their old values, isRemovalPending() returns true, and getBundle() and getRequiringBundles() return null.

Since:
1.2

Method Summary
 Bundle getBundle()
          Returns the bundle which defines this RequiredBundle.
 Bundle[] getRequiringBundles()
          Returns the resolved bundles that currently require this bundle.
 java.lang.String getSymbolicName()
          Returns the symbolic name of the bundle.
 Version getVersion()
          Returns the version of the bundle.
 boolean isRemovalPending()
          Returns true if the bundle has been updated or uninstalled.
 

Method Detail

getBundle

public Bundle getBundle()
Returns the bundle which defines this RequiredBundle.

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

getRequiringBundles

public Bundle[] getRequiringBundles()
Returns the resolved bundles that currently require this bundle. If this RequiredBundle object is required and re-exported by another bundle then all the requiring bundles of the re-exporting bundle are included in the returned array.

Returns:
An array of resolved bundles currently requiring this bundle, or null if this RequiredBundle object has become stale.

getSymbolicName

public java.lang.String getSymbolicName()
Returns the symbolic name of the bundle.

Returns:
The symbolic name of the bundle.

getVersion

public Version getVersion()
Returns the version of the bundle.

Returns:
The version of the bundle.

isRemovalPending

public boolean isRemovalPending()
Returns true if the bundle has been updated or uninstalled.

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

OSGi Service Platform
Release 4

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