org.apache.aries.jmx.framework
Class PackageState

java.lang.Object
  extended by org.apache.aries.jmx.framework.PackageState
All Implemented Interfaces:
PackageStateMBean

public class PackageState
extends Object
implements PackageStateMBean

PackageState represents implementation of PackageStateMBean.

Version:
$Rev: 943268 $ $Date: 2010-05-11 21:19:02 +0100 (Tue, 11 May 2010) $
See Also:
PackageStateMBean

Field Summary
 
Fields inherited from interface org.osgi.jmx.framework.PackageStateMBean
EXPORTING_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 Summary
PackageState(org.osgi.framework.BundleContext context, org.osgi.service.packageadmin.PackageAdmin packageAdmin)
          Constructs new PackagesState MBean.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageState

public PackageState(org.osgi.framework.BundleContext context,
                    org.osgi.service.packageadmin.PackageAdmin packageAdmin)
Constructs new PackagesState MBean.

Parameters:
context - bundle context.
packageAdmin - PackageAdmin service reference.
Method Detail

getExportingBundles

public long[] getExportingBundles(String packageName,
                                  String version)
                           throws IOException
Description copied from interface: PackageStateMBean
Answer the identifier of the bundle exporting the package

Specified by:
getExportingBundles in interface PackageStateMBean
Parameters:
packageName - - the package name
version - - the version of the package
Returns:
the bundle identifiers exporting such a package
Throws:
IOException - if the operation fails
See Also:
PackageStateMBean.getExportingBundles(String, String)

getImportingBundles

public long[] getImportingBundles(String packageName,
                                  String version,
                                  long exportingBundle)
                           throws IOException
Description copied from interface: PackageStateMBean
Answer the list of identifiers of the bundles importing the package

Specified by:
getImportingBundles in interface PackageStateMBean
Parameters:
packageName - The package name
version - The version of the package
exportingBundle - The exporting bundle for the given package
Returns:
the list of bundle identifiers
Throws:
IOException - if the operation fails
See Also:
PackageStateMBean.getImportingBundles(String, String, long)

isRemovalPending

public boolean isRemovalPending(String packageName,
                                String version,
                                long exportingBundle)
                         throws IOException
Description copied from interface: PackageStateMBean
Answer if this package is exported by a bundle which has been updated or uninstalled

Specified by:
isRemovalPending in interface PackageStateMBean
Parameters:
packageName - The package name
version - The version of the package
exportingBundle - The bundle exporting the package
Returns:
true if this package is being exported by a bundle that has been updated or uninstalled.
Throws:
IOException - if the operation fails
See Also:
PackageStateMBean.isRemovalPending(String, String, long)

listPackages

public TabularData listPackages()
                         throws IOException
Description copied from interface: PackageStateMBean
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.

Specified by:
listPackages in interface PackageStateMBean
Returns:
the tabular representation of the package state
Throws:
IOException - When fails
See Also:
PackageStateMBean.listPackages()


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.