Deprecated
This service has been replaced by the
org.osgi.framework.wiring package.
If present, there will only be a single instance of this service registered with the Framework.
org.osgi.service.packageadmin.ExportedPackage , org.osgi.service.packageadmin.RequiredBundle
| Modifier and Type | Field and Description |
|---|---|
| public static final int | BUNDLE_TYPE_FRAGMENT
Bundle type indicating the bundle is a fragment bundle. |
| Modifier and Type | Method and Description |
|---|---|
| public Bundle | Returns: The bundle from which the specified class is loaded ornull if the class was not loaded by a bundle class
loader created by the same framework instance that registered
this PackageAdmin service.The class object from which to locate the bundle. clazz)Returns the bundle from which the specified class is loaded. |
| public Bundle[] | Returns: An array of bundles with the specified name belonging to the specified version range ordered in descending version order, ornull if no bundles are found.The symbolic name of the desired bundles. symbolicName, String The version range of the desired bundles, or
versionRange)null if all versions are desired.Returns the bundles with the specified symbolic name whose bundle version is within the specified version range. |
| public int | Returns: The special type of the bundle.The bundle for which to return the special type. bundle)Returns the special type of the specified bundle. |
| public ExportedPackage | Returns: The exported package, ornull if no exported
package with the specified name exists.The name of the exported package to be returned. name)
Deprecated
Gets the exported package for the specified package name. |
| public ExportedPackage[] | Returns: An array of exported packages, ornull if the
specified bundle has no exported packages.The bundle whose exported packages are to be returned, or
bundle)null if all exported packages are to be returned. If
the specified bundle is the system bundle (that is, the bundle
with id zero), this method returns all the packages known to be
exported by the system bundle. This will include the package
specified by the org.osgi.framework.system.packages
system property as well as any other package exported by the
framework implementation.
Deprecated
Gets the exported packages for the specified bundle. |
| public ExportedPackage[] | Returns: An array of the exported packages, ornull if no
exported packages with the specified name exists.The name of the exported packages to be returned. name)
Deprecated
Gets the exported packages for the specified package name. |
| public Bundle[] | Returns: An array of fragment bundles ornull if the bundle
does not have any attached fragment bundles or the bundle is not
resolved.The bundle whose attached fragment bundles are to be
returned. bundle)Returns an array of attached fragment bundles for the specified bundle. |
| public Bundle[] | Returns: An array containing the host bundles to which the specified fragment is attached ornull if the specified bundle
is not a fragment or is not attached to any host bundles.The fragment bundle whose host bundles are to be returned. bundle)Returns the host bundles to which the specified fragment bundle is attached. |
| public RequiredBundle[] | Returns: An array of required bundles ornull if no
required bundles exist for the specified symbolic name.The bundle symbolic name or symbolicName)null for
all required bundles.
Deprecated
Returns an array of required bundles having the specified symbolic name. |
| public void | refreshPackages(Bundle[]
The bundles whose exported packages are to be updated or
removed, or bundles)null for all bundles updated or
uninstalled since the last call to this method.Forces the update (replacement) or removal of packages exported by the specified bundles. |
| public boolean | Returns: true if all specified bundles are resolved;The bundles to resolve or bundles)null to resolve all
unresolved bundles installed in the Framework.Resolve the specified bundles. |
| BUNDLE_TYPE_FRAGMENT | back to summary |
|---|---|
| public static final int BUNDLE_TYPE_FRAGMENT Bundle type indicating the bundle is a fragment bundle.
The value of
| |
| getBundle | back to summary |
|---|---|
| public Bundle getBundle(Class<?> clazz) Returns the bundle from which the specified class is loaded. The class
loader of the returned bundle must have been used to load the specified
class. If the class was not loaded by a bundle class loader then
| |
| getBundles | back to summary |
|---|---|
| public Bundle[] getBundles(String symbolicName, String versionRange) Returns the bundles with the specified symbolic name whose bundle version
is within the specified version range. If no bundles are installed that
have the specified symbolic name, then
| |
| getBundleType | back to summary |
|---|---|
| public int getBundleType(Bundle bundle) Returns the special type of the specified bundle. The bundle type values are: A bundle may be more than one type at a time. A type code is used to identify the bundle type for future extendability.If a bundle is not one or more of the defined types then 0x00000000 is returned.
| |
| getExportedPackage | back to summary |
|---|---|
| public ExportedPackage getExportedPackage(String name)
Deprecated
Gets the exported package for the specified package name. If there are multiple exported packages with specified name, the exported package with the highest version will be returned.
| |
| getExportedPackages | back to summary |
|---|---|
| public ExportedPackage[] getExportedPackages(Bundle bundle)
Deprecated
Gets the exported packages for the specified bundle.
| |
| getExportedPackages | back to summary |
|---|---|
| public ExportedPackage[] getExportedPackages(String name)
Deprecated
Gets the exported packages for the specified package name.
| |
| getFragments | back to summary |
|---|---|
| public Bundle[] getFragments(Bundle bundle) Returns an array of attached fragment bundles for the specified bundle.
If the specified bundle is a fragment then
This method does not attempt to resolve the specified bundle. If the
specified bundle is not resolved then
| |
| getHosts | back to summary |
|---|---|
| public Bundle[] getHosts(Bundle bundle) Returns the host bundles to which the specified fragment bundle is attached.
| |
| getRequiredBundles | back to summary |
|---|---|
| public RequiredBundle[] getRequiredBundles(String symbolicName)
Deprecated
Returns an array of required bundles having the specified symbolic name.
If
| |
| refreshPackages | back to summary |
|---|---|
| public void refreshPackages(Bundle[] bundles) Forces the update (replacement) or removal of packages exported by the specified bundles. If no bundles are specified, this method will update or remove any packages exported by any bundles that were previously updated or uninstalled since the last call to this method. The technique by which this is accomplished may vary among different Framework implementations. One permissible implementation is to stop and restart the Framework. This method returns to the caller immediately and then performs the following steps on a separate thread:
For any exceptions that are thrown during any of these steps, a
| |
| resolveBundles | back to summary |
|---|---|
| public boolean resolveBundles(Bundle[] bundles) Resolve the specified bundles. The Framework must attempt to resolve the specified bundles that are unresolved. Additional bundles that are not included in the specified bundles may be resolved as a result of calling this method. A permissible implementation of this method is to attempt to resolve all unresolved bundles installed in the framework.
If
| |