Package org.osgi.jmx.framework
Interface BundleStateMBean
public interface BundleStateMBean
This MBean represents the Bundle state of the framework. This MBean also
emits events that clients can use to get notified of the changes in the
bundle state of the framework.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key ACTIVATION_POLICY_USED, used inACTIVATION_POLICY_USED_ITEM.static final ItemThe item containing the indication whether the bundle activation policy must be used inBUNDLE_TYPE.static final StringConstant ACTIVE for theSTATEstatic final CompositeTypeThe Composite Type that represents a bundle event.static final CompositeTypeThe Composite Type that represents a bundle.static final TabularTypeThe Tabular Type for a list of bundles.static final StringThe key EVENT, used inEVENT_ITEM.static final ItemThe item containing the event type.static final StringThe key EXPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM.static final ItemThe item containing the exported package names inBUNDLE_TYPE.The key isEXPORTED_PACKAGESand the the type isJmxConstants.STRING_ARRAY_TYPE.static final StringThe key FRAGMENT, used inFRAGMENT_ITEM.static final ItemThe item containing the fragment status inBUNDLE_TYPE.static final StringThe key FRAGMENTS, used inFRAGMENTS_ITEM.static final ItemThe item containing the list of fragments the bundle is host to inBUNDLE_TYPE.static final CompositeTypeThe Composite Type describing an entry in bundle headers.static final StringThe key HEADERS, used inHEADERS_ITEM.static final ItemThe item containing the bundle headers inBUNDLE_TYPE.static final TabularTypeThe Tabular Type describing the type of the Tabular Data value that is returned fromgetHeaders(long)method.static final StringThe key HOSTS, used inHOSTS_ITEM.static final ItemThe item containing the bundle identifiers representing the hosts inBUNDLE_TYPE.static final StringThe key IDENTIFIER, used inIDENTIFIER_ITEM.static final ItemThe item containing the bundle identifier inBUNDLE_TYPE.static final StringThe key IMPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM.static final ItemThe item containing the imported package names inBUNDLE_TYPE.The key isIMPORTED_PACKAGESand the the type isJmxConstants.STRING_ARRAY_TYPE.static final StringConstant INSTALLED for theSTATEstatic final StringThe key KEY, used inKEY_ITEM.static final ItemThe item describing the key of a bundle header entry.static final StringThe key LAST_MODIFIED, used inLAST_MODIFIED_ITEM.static final ItemThe item containing the last modified time in theBUNDLE_TYPE.static final StringThe key LOCATION, used inLOCATION_ITEM.static final ItemThe item containing the bundle location inBUNDLE_TYPE.static final StringThe Object Name for a Bundle State MBean.static final StringThe key PERSISTENTLY_STARTED, used inPERSISTENTLY_STARTED_ITEM.static final ItemThe item containing the indication of persistently started inBUNDLE_TYPE.static final StringThe key REGISTERED_SERVICES, used inREGISTERED_SERVICES_ITEM.static final ItemThe item containing the registered services of the bundle inBUNDLE_TYPE.static final StringThe key REMOVAL_PENDING, used inREMOVAL_PENDING_ITEM.static final ItemThe item containing the indication of removal pending inBUNDLE_TYPE.static final StringThe key REQUIRED, used inREQUIRED_ITEM.static final StringThe key REQUIRED_BUNDLES, used inREQUIRED_BUNDLES_ITEM.static final ItemThe item containing the required bundles inBUNDLE_TYPE.static final ItemThe item containing the required status inBUNDLE_TYPE.static final StringThe key REQUIRING_BUNDLES, used inREQUIRING_BUNDLES_ITEM.static final ItemThe item containing the bundles requiring this bundle inBUNDLE_TYPE.static final StringConstant RESOLVED for theSTATEstatic final StringThe key SERVICES_IN_USE, used inSERVICES_IN_USE_ITEM.static final ItemThe item containing the services in use by this bundle inBUNDLE_TYPE.static final StringThe key START_LEVEL, used inSTART_LEVEL_ITEM.static final ItemThe item containing the start level inBUNDLE_TYPE.static final StringConstant STARTING for theSTATEstatic final StringThe key STATE, used inSTATE_ITEM.static final ItemThe item containing the bundle state inBUNDLE_TYPE.static final StringConstant STOPPING for theSTATEstatic final StringThe key SYMBOLIC_NAME, used inSYMBOLIC_NAME_ITEM.static final ItemThe item containing the symbolic name inBUNDLE_TYPE.static final StringConstant UNINSTALLED for theSTATEstatic final StringConstant UNKNOWN for theSTATEstatic final StringThe key VALUE, used inVALUE_ITEM.static final ItemThe item describing the value of a bundle header entry.static final StringThe key VERSION, used inVERSION_ITEM.static final ItemThe item containing the symbolic name inBUNDLE_TYPE. -
Method Summary
Modifier and TypeMethodDescriptiongetBundle(long id) New!!long[]String[]getExportedPackages(long bundleId) Answer the list of exported packages for this bundle.long[]getFragments(long bundleId) Answer the list of the bundle ids of the fragments associated with this bundlegetHeaders(long bundleId) Answer the headers for the bundle uniquely identified by the bundle id.getHeaders(long bundleId, String locale) long[]getHosts(long fragment) Answer the list of bundle ids of the bundles which host a fragmentString[]getImportedPackages(long bundleId) Answer the array of the packages imported by this bundlelonggetLastModified(long bundleId) Answer the last modified time of a bundlegetLocation(long bundleId) Answer the location of the bundle.long[]getRegisteredServices(long bundleId) Answer the list of service identifiers representing the services this bundle exportslong[]getRequiredBundles(long bundleIdentifier) Answer the list of identifiers of the bundles this bundle depends uponlong[]getRequiringBundles(long bundleIdentifier) Answer the list of identifiers of the bundles which require this bundlelong[]getServicesInUse(long bundleIdentifier) Answer the list of service identifiers which refer to the the services this bundle is usingintgetStartLevel(long bundleId) Answer the start level of the bundlegetState(long bundleId) Answer the symbolic name of the state of the bundlegetSymbolicName(long bundleId) Answer the symbolic name of the bundlegetVersion(long bundleId) Answer the location of the bundle.booleanisActivationPolicyUsed(long bundleId) Answer whether the specified bundle's autostart setting indicates that the activation policy declared in the bundle's manifest must be used.booleanisFragment(long bundleId) Answer whether the bundle is a fragment or notbooleanisPersistentlyStarted(long bundleId) Answer if the bundle is persistently started when its start level is reachedbooleanisRemovalPending(long bundleId) Answer true if the bundle is pending removalbooleanisRequired(long bundleId) Answer true if the bundle is required by another bundleAnswer the bundle state of the system in tabular form.listBundles(String... items)
-
Field Details
-
OBJECTNAME
The Object Name for a Bundle State MBean.- See Also:
-
KEY
The key KEY, used inKEY_ITEM.- See Also:
-
KEY_ITEM
The item describing the key of a bundle header entry. The key isKEYand the type isSimpleType.STRING. -
VALUE
The key VALUE, used inVALUE_ITEM.- See Also:
-
VALUE_ITEM
The item describing the value of a bundle header entry. The key isVALUEand the type isSimpleType.STRING. -
HEADER_TYPE
The Composite Type describing an entry in bundle headers. It consists ofKEY_ITEMandVALUE_ITEM. -
HEADERS_TYPE
The Tabular Type describing the type of the Tabular Data value that is returned fromgetHeaders(long)method. The primary item isKEY_ITEM. -
LOCATION
The key LOCATION, used inLOCATION_ITEM.- See Also:
-
LOCATION_ITEM
The item containing the bundle location inBUNDLE_TYPE. The key isLOCATIONand the the type isSimpleType.STRING. -
IDENTIFIER
The key IDENTIFIER, used inIDENTIFIER_ITEM.- See Also:
-
IDENTIFIER_ITEM
The item containing the bundle identifier inBUNDLE_TYPE. The key isIDENTIFIERand the the type isSimpleType.LONG. -
SYMBOLIC_NAME
The key SYMBOLIC_NAME, used inSYMBOLIC_NAME_ITEM.- See Also:
-
SYMBOLIC_NAME_ITEM
The item containing the symbolic name inBUNDLE_TYPE. The key isSYMBOLIC_NAMEand the the type isSimpleType.STRING. -
VERSION
The key VERSION, used inVERSION_ITEM.- See Also:
-
VERSION_ITEM
The item containing the symbolic name inBUNDLE_TYPE. The key isSYMBOLIC_NAMEand the the type isSimpleType.STRING. -
START_LEVEL
The key START_LEVEL, used inSTART_LEVEL_ITEM.- See Also:
-
START_LEVEL_ITEM
The item containing the start level inBUNDLE_TYPE. The key isSTART_LEVELand the the type isSimpleType.INTEGER. -
STATE
The key STATE, used inSTATE_ITEM.- See Also:
-
INSTALLED
Constant INSTALLED for theSTATE- See Also:
-
RESOLVED
Constant RESOLVED for theSTATE- See Also:
-
STARTING
Constant STARTING for theSTATE- See Also:
-
ACTIVE
Constant ACTIVE for theSTATE- See Also:
-
STOPPING
Constant STOPPING for theSTATE- See Also:
-
UNINSTALLED
Constant UNINSTALLED for theSTATE- See Also:
-
UNKNOWN
Constant UNKNOWN for theSTATE- See Also:
-
STATE_ITEM
The item containing the bundle state inBUNDLE_TYPE. The key isSTATEand the the type isSimpleType.STRING. The returned values must be one of the following strings: -
LAST_MODIFIED
The key LAST_MODIFIED, used inLAST_MODIFIED_ITEM.- See Also:
-
LAST_MODIFIED_ITEM
The item containing the last modified time in theBUNDLE_TYPE. The key isLAST_MODIFIEDand the the type isSimpleType.LONG. -
ACTIVATION_POLICY_USED
The key ACTIVATION_POLICY_USED, used inACTIVATION_POLICY_USED_ITEM.- See Also:
-
ACTIVATION_POLICY_USED_ITEM
The item containing the indication whether the bundle activation policy must be used inBUNDLE_TYPE. The key isACTIVATION_POLICY_USEDand the type isSimpleType.BOOLEAN. -
PERSISTENTLY_STARTED
The key PERSISTENTLY_STARTED, used inPERSISTENTLY_STARTED_ITEM.- See Also:
-
PERSISTENTLY_STARTED_ITEM
The item containing the indication of persistently started inBUNDLE_TYPE. The key isPERSISTENTLY_STARTEDand the the type isSimpleType.BOOLEAN. -
REMOVAL_PENDING
The key REMOVAL_PENDING, used inREMOVAL_PENDING_ITEM.- See Also:
-
REMOVAL_PENDING_ITEM
The item containing the indication of removal pending inBUNDLE_TYPE. The key isREMOVAL_PENDINGand the type isSimpleType.BOOLEAN. -
REQUIRED
The key REQUIRED, used inREQUIRED_ITEM.- See Also:
-
REQUIRED_ITEM
The item containing the required status inBUNDLE_TYPE. The key isREQUIREDand the the type isSimpleType.BOOLEAN. -
FRAGMENT
The key FRAGMENT, used inFRAGMENT_ITEM.- See Also:
-
FRAGMENT_ITEM
The item containing the fragment status inBUNDLE_TYPE. The key isFRAGMENTand the the type isSimpleType.BOOLEAN. -
REGISTERED_SERVICES
The key REGISTERED_SERVICES, used inREGISTERED_SERVICES_ITEM.- See Also:
-
REGISTERED_SERVICES_ITEM
The item containing the registered services of the bundle inBUNDLE_TYPE. The key isREGISTERED_SERVICESand the the type isJmxConstants.LONG_ARRAY_TYPE. -
SERVICES_IN_USE
The key SERVICES_IN_USE, used inSERVICES_IN_USE_ITEM.- See Also:
-
SERVICES_IN_USE_ITEM
The item containing the services in use by this bundle inBUNDLE_TYPE. The key isSERVICES_IN_USEand the the type isJmxConstants.LONG_ARRAY_TYPE. -
HEADERS
The key HEADERS, used inHEADERS_ITEM.- See Also:
-
HEADERS_ITEM
The item containing the bundle headers inBUNDLE_TYPE. The key isHEADERSand the the type isHEADERS_TYPE. -
EXPORTED_PACKAGES
The key EXPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM.- See Also:
-
EXPORTED_PACKAGES_ITEM
The item containing the exported package names inBUNDLE_TYPE.The key isEXPORTED_PACKAGESand the the type isJmxConstants.STRING_ARRAY_TYPE. -
IMPORTED_PACKAGES
The key IMPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM.- See Also:
-
IMPORTED_PACKAGES_ITEM
The item containing the imported package names inBUNDLE_TYPE.The key isIMPORTED_PACKAGESand the the type isJmxConstants.STRING_ARRAY_TYPE. -
FRAGMENTS
The key FRAGMENTS, used inFRAGMENTS_ITEM.- See Also:
-
FRAGMENTS_ITEM
The item containing the list of fragments the bundle is host to inBUNDLE_TYPE. The key isFRAGMENTSand the type isJmxConstants.LONG_ARRAY_TYPE. -
HOSTS
The key HOSTS, used inHOSTS_ITEM.- See Also:
-
HOSTS_ITEM
The item containing the bundle identifiers representing the hosts inBUNDLE_TYPE. The key isHOSTSand the type isJmxConstants.LONG_ARRAY_TYPE -
REQUIRED_BUNDLES
The key REQUIRED_BUNDLES, used inREQUIRED_BUNDLES_ITEM.- See Also:
-
REQUIRED_BUNDLES_ITEM
The item containing the required bundles inBUNDLE_TYPE. The key isREQUIRED_BUNDLESand the type isJmxConstants.LONG_ARRAY_TYPE -
REQUIRING_BUNDLES
The key REQUIRING_BUNDLES, used inREQUIRING_BUNDLES_ITEM.- See Also:
-
REQUIRING_BUNDLES_ITEM
The item containing the bundles requiring this bundle inBUNDLE_TYPE. The key isREQUIRING_BUNDLESand the type isJmxConstants.LONG_ARRAY_TYPE -
EVENT
The key EVENT, used inEVENT_ITEM.- See Also:
-
EVENT_ITEM
The item containing the event type. The key isEVENTand the type isSimpleType.INTEGER -
BUNDLE_EVENT_TYPE
The Composite Type that represents a bundle event. This composite consists of: -
BUNDLE_TYPE
The Composite Type that represents a bundle. This composite consist of:EXPORTED_PACKAGESFRAGMENTFRAGMENTSHEADERSHOSTSIDENTIFIERIMPORTED_PACKAGESLAST_MODIFIEDLOCATIONACTIVATION_POLICY_USEDPERSISTENTLY_STARTEDREGISTERED_SERVICESREMOVAL_PENDINGREQUIREDREQUIRED_BUNDLESREQUIRING_BUNDLESSTART_LEVELSTATESERVICES_IN_USESYMBOLIC_NAMEVERSION
BUNDLES_TYPE. -
BUNDLES_TYPE
The Tabular Type for a list of bundles. The row type isBUNDLE_TYPEand the index isIDENTIFIER.
-
-
Method Details
-
getBundle
New!!- Parameters:
id- The Bundle ID- Returns:
- The Bundle Data
- Throws:
IOException
-
getBundleIds
- Throws:
IOException
-
getRequiredBundles
Answer the list of identifiers of the bundles this bundle depends upon- Parameters:
bundleIdentifier- the bundle identifier- Returns:
- the list of bundle identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
listBundles
Answer the bundle state of the system in tabular form. Each row of the returned table represents a single bundle. The Tabular Data consists of Composite Data that is type byBUNDLES_TYPE.- Returns:
- the tabular representation of the bundle state
- Throws:
IOException
-
listBundles
- Throws:
IOException
-
getExportedPackages
Answer the list of exported packages for this bundle.- Parameters:
bundleId-- Returns:
- the array of package names, combined with their version in the format <packageName;version>
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getFragments
Answer the list of the bundle ids of the fragments associated with this bundle- Parameters:
bundleId-- Returns:
- the array of bundle identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getHeaders
Answer the headers for the bundle uniquely identified by the bundle id. The Tabular Data is typed by theHEADERS_TYPE.- Parameters:
bundleId- the unique identifier of the bundle- Returns:
- the table of associated header key and values
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getHeaders
- Throws:
IOException
-
getHeader
- Throws:
IOException
-
getHeader
- Throws:
IOException
-
getHosts
Answer the list of bundle ids of the bundles which host a fragment- Parameters:
fragment- the bundle id of the fragment- Returns:
- the array of bundle identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getImportedPackages
Answer the array of the packages imported by this bundle- Parameters:
bundleId- the bundle identifier- Returns:
- the array of package names, combined with their version in the format <packageName;version>
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getLastModified
Answer the last modified time of a bundle- Parameters:
bundleId- the unique identifier of a bundle- Returns:
- the last modified time
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getRegisteredServices
Answer the list of service identifiers representing the services this bundle exports- Parameters:
bundleId- the bundle identifier- Returns:
- the list of service identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getRequiringBundles
Answer the list of identifiers of the bundles which require this bundle- Parameters:
bundleIdentifier- the bundle identifier- Returns:
- the list of bundle identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getServicesInUse
Answer the list of service identifiers which refer to the the services this bundle is using- Parameters:
bundleIdentifier- the bundle identifier- Returns:
- the list of service identifiers
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getStartLevel
Answer the start level of the bundle- Parameters:
bundleId- the identifier of the bundle- Returns:
- the start level
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getState
Answer the symbolic name of the state of the bundle- Parameters:
bundleId- the identifier of the bundle- Returns:
- the string name of the bundle state
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getSymbolicName
Answer the symbolic name of the bundle- Parameters:
bundleId- the identifier of the bundle- Returns:
- the symbolic name
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
isActivationPolicyUsed
Answer whether the specified bundle's autostart setting indicates that the activation policy declared in the bundle's manifest must be used.- Parameters:
bundleId- the identifier of the bundle- Returns:
- true if the bundle's autostart setting indicates the activation policy declared in the manifest must be used. false if the bundle must be eagerly activated.
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
isPersistentlyStarted
Answer if the bundle is persistently started when its start level is reached- Parameters:
bundleId- the identifier of the bundle- Returns:
- true if the bundle is persistently started
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
isFragment
Answer whether the bundle is a fragment or not- Parameters:
bundleId- the identifier of the bundle- Returns:
- true if the bundle is a fragment
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
isRemovalPending
Answer true if the bundle is pending removal- Parameters:
bundleId- the identifier of the bundle- Returns:
- true if the bundle is pending removal
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
isRequired
Answer true if the bundle is required by another bundle- Parameters:
bundleId- the identifier of the bundle- Returns:
- true if the bundle is required by another bundle
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getLocation
Answer the location of the bundle.- Parameters:
bundleId- the identifier of the bundle- Returns:
- The location string of this bundle
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-
getVersion
Answer the location of the bundle.- Parameters:
bundleId- the identifier of the bundle- Returns:
- The location string of this bundle
- Throws:
IOException- if the operation failsIllegalArgumentException- if the bundle indicated does not exist
-