org.osgi.jmx.framework
Interface PackageStateMBean

All Known Implementing Classes:
PackageState

public interface PackageStateMBean

This MBean provides information about the package state of the framework.

Version:
$Revision: 919575 $

Field Summary
static String EXPORTING_BUNDLES
          The key EXPORTING_BUNDLE, used in EXPORTING_BUNDLES_ITEM.
static Item EXPORTING_BUNDLES_ITEM
          The item containing the bundle identifier in PACKAGE_TYPE.
static String IMPORTING_BUNDLES
          The key IMPORTING_BUNDLES, used in IMPORTING_BUNDLES_ITEM.
static Item IMPORTING_BUNDLES_ITEM
          The item containing the bundle identifier in PACKAGE_TYPE.
static String NAME
          The key NAME, used in NAME_ITEM.
static Item NAME_ITEM
          The item containing the name of the package in PACKAGE_TYPE.
static String OBJECTNAME
          The fully qualified object name of this MBean.
static CompositeType PACKAGE_TYPE
          The Composite Type for a CompositeData representing a package.
static TabularType PACKAGES_TYPE
          The Tabular Type used in listPackages().
static String REMOVAL_PENDING
          The name of the item containing the pending removal status of the package in the CompositeData.
static Item REMOVAL_PENDING_ITEM
          The item representing the removal pending status of a package.
static String VERSION
          The name of the item containing the package version in the CompositeData.
static Item VERSION_ITEM
          The item containing the version of the package in PACKAGE_TYPE.
 
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 PACKAGES_TYPE, which has PACKAGE_TYPE as its Composite Type.
 

Field Detail

OBJECTNAME

static final String OBJECTNAME
The fully qualified object name of this MBean.

See Also:
Constant Field Values

EXPORTING_BUNDLES

static final String EXPORTING_BUNDLES
The key EXPORTING_BUNDLE, used in EXPORTING_BUNDLES_ITEM.

See Also:
Constant Field Values

EXPORTING_BUNDLES_ITEM

static final Item EXPORTING_BUNDLES_ITEM
The item containing the bundle identifier in PACKAGE_TYPE. The key is EXPORTING_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE.


IMPORTING_BUNDLES

static final String IMPORTING_BUNDLES
The key IMPORTING_BUNDLES, used in IMPORTING_BUNDLES_ITEM.

See Also:
Constant Field Values

IMPORTING_BUNDLES_ITEM

static final Item IMPORTING_BUNDLES_ITEM
The item containing the bundle identifier in PACKAGE_TYPE. The key is IMPORTING_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE.


NAME

static final String NAME
The key NAME, used in NAME_ITEM.

See Also:
Constant Field Values

NAME_ITEM

static final Item NAME_ITEM
The item containing the name of the package in PACKAGE_TYPE. The key is NAME and the type is SimpleType.LONG.


REMOVAL_PENDING

static final String REMOVAL_PENDING
The name of the item containing the pending removal status of the package in the CompositeData. Used

See Also:
Constant Field Values

REMOVAL_PENDING_ITEM

static final Item REMOVAL_PENDING_ITEM
The item representing the removal pending status of a package. The key is REMOVAL_PENDING and the type is SimpleType.BOOLEAN.


VERSION

static final String VERSION
The name of the item containing the package version in the CompositeData. Used in VERSION_ITEM.

See Also:
Constant Field Values

VERSION_ITEM

static final Item VERSION_ITEM
The item containing the version of the package in PACKAGE_TYPE. The key is VERSION and the type is SimpleType.STRING.


PACKAGE_TYPE

static final CompositeType PACKAGE_TYPE
The Composite Type for a CompositeData representing a package. This type consists of: The key is defined as NAME and EXPORTING_BUNDLES


PACKAGES_TYPE

static final TabularType PACKAGES_TYPE
The Tabular Type used in listPackages(). They key is NAME, VERSION, and EXPORTING_BUNDLES.

Method Detail

getExportingBundles

long[] getExportingBundles(String packageName,
                           String version)
                           throws IOException
Answer the identifier of the bundle exporting the package

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
IllegalArgumentException - if the package indicated does not exist

getImportingBundles

long[] getImportingBundles(String packageName,
                           String version,
                           long exportingBundle)
                           throws IOException
Answer the list of identifiers of the bundles importing the package

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
IllegalArgumentException - if the package indicated does not exist

listPackages

TabularData listPackages()
                         throws IOException
Answer the package state of the system in tabular form The Tabular Data is typed by PACKAGES_TYPE, which has PACKAGE_TYPE as its Composite Type.

Returns:
the tabular representation of the package state
Throws:
IOException - When fails

isRemovalPending

boolean isRemovalPending(String packageName,
                         String version,
                         long exportingBundle)
                         throws IOException
Answer if this package is exported by a bundle which has been updated or uninstalled

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
IllegalArgumentException - if the package indicated does not exist


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