public class PackageState extends java.lang.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(java.lang.String packageName,
java.lang.String version)
Answer the identifier of the bundle exporting the package
|
long[] |
getImportingBundles(java.lang.String packageName,
java.lang.String version,
long exportingBundle)
Answer the list of identifiers of the bundles importing the package
|
boolean |
isRemovalPending(java.lang.String packageName,
java.lang.String version,
long exportingBundle)
Answer if this package is exported by a bundle which has been updated or
uninstalled
|
javax.management.openmbean.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(java.lang.String packageName,
java.lang.String version)
throws java.io.IOException
PackageStateMBeangetExportingBundles in interface PackageStateMBeanpackageName - - the package nameversion - - the version of the packagejava.io.IOException - if the operation failsPackageStateMBean.getExportingBundles(String, String)public long[] getImportingBundles(java.lang.String packageName,
java.lang.String version,
long exportingBundle)
throws java.io.IOException
PackageStateMBeangetImportingBundles in interface PackageStateMBeanpackageName - The package nameversion - The version of the packageexportingBundle - The exporting bundle for the given packagejava.io.IOException - if the operation failsPackageStateMBean.getImportingBundles(String, String, long)public boolean isRemovalPending(java.lang.String packageName,
java.lang.String version,
long exportingBundle)
throws java.io.IOException
PackageStateMBeanisRemovalPending in interface PackageStateMBeanpackageName - The package nameversion - The version of the packageexportingBundle - The bundle exporting the packagejava.io.IOException - if the operation failsPackageStateMBean.isRemovalPending(String, String, long)public javax.management.openmbean.TabularData listPackages()
throws java.io.IOException
PackageStateMBeanPackageStateMBean.PACKAGES_TYPE, which has
PackageStateMBean.PACKAGE_TYPE as its Composite Type.listPackages in interface PackageStateMBeanjava.io.IOException - When failsPackageStateMBean.listPackages()Copyright © 2009-2019 The Apache Software Foundation. All Rights Reserved.