public class PackageState extends Object implements PackageStateMBean
PackageState represents implementation of PackageStateMBean.
PackageStateMBeanEXPORTING_BUNDLES, EXPORTING_BUNDLES_ITEM, IMPORTING_BUNDLES, IMPORTING_BUNDLES_ITEM, NAME, NAME_ITEM, OBJECTNAME, PACKAGE_TYPE, PACKAGES_TYPE, REMOVAL_PENDING, REMOVAL_PENDING_ITEM, VERSION, VERSION_ITEM| Constructor and Description |
|---|
PackageState(org.osgi.framework.BundleContext context,
org.osgi.service.packageadmin.PackageAdmin packageAdmin)
Constructs new PackagesState MBean.
|
| Modifier and Type | Method and Description |
|---|---|
long[] |
getExportingBundles(String packageName,
String version)
Answer the identifier of the bundle exporting the package
|
long[] |
getImportingBundles(String packageName,
String version,
long exportingBundle)
Answer the list of identifiers of the bundles importing the package
|
boolean |
isRemovalPending(String packageName,
String version,
long exportingBundle)
Answer if this package is exported by a bundle which has been updated or
uninstalled
|
TabularData |
listPackages()
Answer the package state of the system in tabular form
The Tabular Data is typed by
PackageStateMBean.PACKAGES_TYPE, which has
PackageStateMBean.PACKAGE_TYPE as its Composite Type. |
public PackageState(org.osgi.framework.BundleContext context,
org.osgi.service.packageadmin.PackageAdmin packageAdmin)
context - bundle context.packageAdmin - PackageAdmin service reference.public long[] getExportingBundles(String packageName, String version) throws IOException
PackageStateMBeangetExportingBundles in interface PackageStateMBeanpackageName - - the package nameversion - - the version of the packageIOException - if the operation failsPackageStateMBean.getExportingBundles(String, String)public long[] getImportingBundles(String packageName, String version, long exportingBundle) throws IOException
PackageStateMBeangetImportingBundles in interface PackageStateMBeanpackageName - The package nameversion - The version of the packageexportingBundle - The exporting bundle for the given packageIOException - if the operation failsPackageStateMBean.getImportingBundles(String, String, long)public boolean isRemovalPending(String packageName, String version, long exportingBundle) throws IOException
PackageStateMBeanisRemovalPending in interface PackageStateMBeanpackageName - The package nameversion - The version of the packageexportingBundle - The bundle exporting the packageIOException - if the operation failsPackageStateMBean.isRemovalPending(String, String, long)public TabularData listPackages() throws IOException
PackageStateMBeanPackageStateMBean.PACKAGES_TYPE, which has
PackageStateMBean.PACKAGE_TYPE as its Composite Type.listPackages in interface PackageStateMBeanIOException - When failsPackageStateMBean.listPackages()Copyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.