Package org.osgi.jmx.framework
Interface PackageStateMBean
public interface PackageStateMBean
This MBean provides information about the package state of the framework.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key EXPORTING_BUNDLE, used inEXPORTING_BUNDLES_ITEM.static final ItemThe item containing the bundle identifier inPACKAGE_TYPE.static final StringThe key IMPORTING_BUNDLES, used inIMPORTING_BUNDLES_ITEM.static final ItemThe item containing the bundle identifier inPACKAGE_TYPE.static final StringThe key NAME, used inNAME_ITEM.static final ItemThe item containing the name of the package inPACKAGE_TYPE.static final StringThe fully qualified object name of this MBean.static final CompositeTypeThe Composite Type for a CompositeData representing a package.static final TabularTypeThe Tabular Type used inlistPackages().static final StringThe name of the item containing the pending removal status of the package in the CompositeData.static final ItemThe item representing the removal pending status of a package.static final StringThe name of the item containing the package version in the CompositeData.static final ItemThe item containing the version of the package inPACKAGE_TYPE. -
Method Summary
Modifier and TypeMethodDescriptionlong[]getExportingBundles(String packageName, String version) Answer the identifier of the bundle exporting the packagelong[]getImportingBundles(String packageName, String version, long exportingBundle) Answer the list of identifiers of the bundles importing the packagebooleanisRemovalPending(String packageName, String version, long exportingBundle) Answer if this package is exported by a bundle which has been updated or uninstalledAnswer the package state of the system in tabular form The Tabular Data is typed byPACKAGES_TYPE, which hasPACKAGE_TYPEas its Composite Type.
-
Field Details
-
OBJECTNAME
The fully qualified object name of this MBean.- See Also:
-
EXPORTING_BUNDLES
The key EXPORTING_BUNDLE, used inEXPORTING_BUNDLES_ITEM.- See Also:
-
EXPORTING_BUNDLES_ITEM
The item containing the bundle identifier inPACKAGE_TYPE. The key isEXPORTING_BUNDLESand the type isJmxConstants.LONG_ARRAY_TYPE. -
IMPORTING_BUNDLES
The key IMPORTING_BUNDLES, used inIMPORTING_BUNDLES_ITEM.- See Also:
-
IMPORTING_BUNDLES_ITEM
The item containing the bundle identifier inPACKAGE_TYPE. The key isIMPORTING_BUNDLESand the type isJmxConstants.LONG_ARRAY_TYPE. -
NAME
The key NAME, used inNAME_ITEM.- See Also:
-
NAME_ITEM
The item containing the name of the package inPACKAGE_TYPE. The key isNAMEand the type isSimpleType.LONG. -
REMOVAL_PENDING
The name of the item containing the pending removal status of the package in the CompositeData. Used- See Also:
-
REMOVAL_PENDING_ITEM
The item representing the removal pending status of a package. The key isREMOVAL_PENDINGand the type isSimpleType.BOOLEAN. -
VERSION
The name of the item containing the package version in the CompositeData. Used inVERSION_ITEM.- See Also:
-
VERSION_ITEM
The item containing the version of the package inPACKAGE_TYPE. The key isVERSIONand the type isSimpleType.STRING. -
PACKAGE_TYPE
The Composite Type for a CompositeData representing a package. This type consists of: The key is defined asNAMEandEXPORTING_BUNDLES -
PACKAGES_TYPE
-
-
Method Details
-
getExportingBundles
Answer the identifier of the bundle exporting the package- Parameters:
packageName- - the package nameversion- - the version of the package- Returns:
- the bundle identifiers exporting such a package
- Throws:
IOException- if the operation failsIllegalArgumentException- 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 nameversion- The version of the packageexportingBundle- The exporting bundle for the given package- Returns:
- the list of bundle identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the package indicated does not exist
-
listPackages
Answer the package state of the system in tabular form The Tabular Data is typed byPACKAGES_TYPE, which hasPACKAGE_TYPEas 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 nameversion- The version of the packageexportingBundle- 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 failsIllegalArgumentException- if the package indicated does not exist
-