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
Fields Modifier and Type Field Description static java.lang.String
ACTIVATION_POLICY_USED
The key ACTIVATION_POLICY_USED, used inACTIVATION_POLICY_USED_ITEM
.static Item
ACTIVATION_POLICY_USED_ITEM
The item containing the indication whether the bundle activation policy must be used inBUNDLE_TYPE
.static java.lang.String
ACTIVE
Constant ACTIVE for theSTATE
static javax.management.openmbean.CompositeType
BUNDLE_EVENT_TYPE
The Composite Type that represents a bundle event.static javax.management.openmbean.CompositeType
BUNDLE_TYPE
The Composite Type that represents a bundle.static javax.management.openmbean.TabularType
BUNDLES_TYPE
The Tabular Type for a list of bundles.static java.lang.String
EVENT
The key EVENT, used inEVENT_ITEM
.static Item
EVENT_ITEM
The item containing the event type.static java.lang.String
EXPORTED_PACKAGES
The key EXPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM
.static Item
EXPORTED_PACKAGES_ITEM
The item containing the exported package names inBUNDLE_TYPE
.The key isEXPORTED_PACKAGES
and the the type isJmxConstants.STRING_ARRAY_TYPE
.static java.lang.String
FRAGMENT
The key FRAGMENT, used inFRAGMENT_ITEM
.static Item
FRAGMENT_ITEM
The item containing the fragment status inBUNDLE_TYPE
.static java.lang.String
FRAGMENTS
The key FRAGMENTS, used inFRAGMENTS_ITEM
.static Item
FRAGMENTS_ITEM
The item containing the list of fragments the bundle is host to inBUNDLE_TYPE
.static javax.management.openmbean.CompositeType
HEADER_TYPE
The Composite Type describing an entry in bundle headers.static java.lang.String
HEADERS
The key HEADERS, used inHEADERS_ITEM
.static Item
HEADERS_ITEM
The item containing the bundle headers inBUNDLE_TYPE
.static javax.management.openmbean.TabularType
HEADERS_TYPE
The Tabular Type describing the type of the Tabular Data value that is returned fromgetHeaders(long)
method.static java.lang.String
HOSTS
The key HOSTS, used inHOSTS_ITEM
.static Item
HOSTS_ITEM
The item containing the bundle identifiers representing the hosts inBUNDLE_TYPE
.static java.lang.String
IDENTIFIER
The key IDENTIFIER, used inIDENTIFIER_ITEM
.static Item
IDENTIFIER_ITEM
The item containing the bundle identifier inBUNDLE_TYPE
.static java.lang.String
IMPORTED_PACKAGES
The key IMPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM
.static Item
IMPORTED_PACKAGES_ITEM
The item containing the imported package names inBUNDLE_TYPE
.The key isIMPORTED_PACKAGES
and the the type isJmxConstants.STRING_ARRAY_TYPE
.static java.lang.String
INSTALLED
Constant INSTALLED for theSTATE
static java.lang.String
KEY
The key KEY, used inKEY_ITEM
.static Item
KEY_ITEM
The item describing the key of a bundle header entry.static java.lang.String
LAST_MODIFIED
The key LAST_MODIFIED, used inLAST_MODIFIED_ITEM
.static Item
LAST_MODIFIED_ITEM
The item containing the last modified time in theBUNDLE_TYPE
.static java.lang.String
LOCATION
The key LOCATION, used inLOCATION_ITEM
.static Item
LOCATION_ITEM
The item containing the bundle location inBUNDLE_TYPE
.static java.lang.String
OBJECTNAME
The Object Name for a Bundle State MBean.static java.lang.String
PERSISTENTLY_STARTED
The key PERSISTENTLY_STARTED, used inPERSISTENTLY_STARTED_ITEM
.static Item
PERSISTENTLY_STARTED_ITEM
The item containing the indication of persistently started inBUNDLE_TYPE
.static java.lang.String
REGISTERED_SERVICES
The key REGISTERED_SERVICES, used inREGISTERED_SERVICES_ITEM
.static Item
REGISTERED_SERVICES_ITEM
The item containing the registered services of the bundle inBUNDLE_TYPE
.static java.lang.String
REMOVAL_PENDING
The key REMOVAL_PENDING, used inREMOVAL_PENDING_ITEM
.static Item
REMOVAL_PENDING_ITEM
The item containing the indication of removal pending inBUNDLE_TYPE
.static java.lang.String
REQUIRED
The key REQUIRED, used inREQUIRED_ITEM
.static java.lang.String
REQUIRED_BUNDLES
The key REQUIRED_BUNDLES, used inREQUIRED_BUNDLES_ITEM
.static Item
REQUIRED_BUNDLES_ITEM
The item containing the required bundles inBUNDLE_TYPE
.static Item
REQUIRED_ITEM
The item containing the required status inBUNDLE_TYPE
.static java.lang.String
REQUIRING_BUNDLES
The key REQUIRING_BUNDLES, used inREQUIRING_BUNDLES_ITEM
.static Item
REQUIRING_BUNDLES_ITEM
The item containing the bundles requiring this bundle inBUNDLE_TYPE
.static java.lang.String
RESOLVED
Constant RESOLVED for theSTATE
static java.lang.String
SERVICES_IN_USE
The key SERVICES_IN_USE, used inSERVICES_IN_USE_ITEM
.static Item
SERVICES_IN_USE_ITEM
The item containing the services in use by this bundle inBUNDLE_TYPE
.static java.lang.String
START_LEVEL
The key START_LEVEL, used inSTART_LEVEL_ITEM
.static Item
START_LEVEL_ITEM
The item containing the start level inBUNDLE_TYPE
.static java.lang.String
STARTING
Constant STARTING for theSTATE
static java.lang.String
STATE
The key STATE, used inSTATE_ITEM
.static Item
STATE_ITEM
The item containing the bundle state inBUNDLE_TYPE
.static java.lang.String
STOPPING
Constant STOPPING for theSTATE
static java.lang.String
SYMBOLIC_NAME
The key SYMBOLIC_NAME, used inSYMBOLIC_NAME_ITEM
.static Item
SYMBOLIC_NAME_ITEM
The item containing the symbolic name inBUNDLE_TYPE
.static java.lang.String
UNINSTALLED
Constant UNINSTALLED for theSTATE
static java.lang.String
UNKNOWN
Constant UNKNOWN for theSTATE
static java.lang.String
VALUE
The key VALUE, used inVALUE_ITEM
.static Item
VALUE_ITEM
The item describing the value of a bundle header entry.static java.lang.String
VERSION
The key VERSION, used inVERSION_ITEM
.static Item
VERSION_ITEM
The item containing the symbolic name inBUNDLE_TYPE
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.management.openmbean.CompositeData
getBundle(long id)
New!!long[]
getBundleIds()
java.lang.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 bundlejava.lang.String
getHeader(long bundleId, java.lang.String key)
java.lang.String
getHeader(long bundleId, java.lang.String key, java.lang.String locale)
javax.management.openmbean.TabularData
getHeaders(long bundleId)
Answer the headers for the bundle uniquely identified by the bundle id.javax.management.openmbean.TabularData
getHeaders(long bundleId, java.lang.String locale)
long[]
getHosts(long fragment)
Answer the list of bundle ids of the bundles which host a fragmentjava.lang.String[]
getImportedPackages(long bundleId)
Answer the array of the packages imported by this bundlelong
getLastModified(long bundleId)
Answer the last modified time of a bundlejava.lang.String
getLocation(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 usingint
getStartLevel(long bundleId)
Answer the start level of the bundlejava.lang.String
getState(long bundleId)
Answer the symbolic name of the state of the bundlejava.lang.String
getSymbolicName(long bundleId)
Answer the symbolic name of the bundlejava.lang.String
getVersion(long bundleId)
Answer the location of the bundle.boolean
isActivationPolicyUsed(long bundleId)
Answer whether the specified bundle's autostart setting indicates that the activation policy declared in the bundle's manifest must be used.boolean
isFragment(long bundleId)
Answer whether the bundle is a fragment or notboolean
isPersistentlyStarted(long bundleId)
Answer if the bundle is persistently started when its start level is reachedboolean
isRemovalPending(long bundleId)
Answer true if the bundle is pending removalboolean
isRequired(long bundleId)
Answer true if the bundle is required by another bundlejavax.management.openmbean.TabularData
listBundles()
Answer the bundle state of the system in tabular form.javax.management.openmbean.TabularData
listBundles(java.lang.String... items)
-
-
-
Field Detail
-
OBJECTNAME
static final java.lang.String OBJECTNAME
The Object Name for a Bundle State MBean.- See Also:
- Constant Field Values
-
KEY
static final java.lang.String KEY
The key KEY, used inKEY_ITEM
.- See Also:
- Constant Field Values
-
KEY_ITEM
static final Item KEY_ITEM
The item describing the key of a bundle header entry. The key isKEY
and the type isSimpleType.STRING
.
-
VALUE
static final java.lang.String VALUE
The key VALUE, used inVALUE_ITEM
.- See Also:
- Constant Field Values
-
VALUE_ITEM
static final Item VALUE_ITEM
The item describing the value of a bundle header entry. The key isVALUE
and the type isSimpleType.STRING
.
-
HEADER_TYPE
static final javax.management.openmbean.CompositeType HEADER_TYPE
The Composite Type describing an entry in bundle headers. It consists ofKEY_ITEM
andVALUE_ITEM
.
-
HEADERS_TYPE
static final javax.management.openmbean.TabularType 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
static final java.lang.String LOCATION
The key LOCATION, used inLOCATION_ITEM
.- See Also:
- Constant Field Values
-
LOCATION_ITEM
static final Item LOCATION_ITEM
The item containing the bundle location inBUNDLE_TYPE
. The key isLOCATION
and the the type isSimpleType.STRING
.
-
IDENTIFIER
static final java.lang.String IDENTIFIER
The key IDENTIFIER, used inIDENTIFIER_ITEM
.- See Also:
- Constant Field Values
-
IDENTIFIER_ITEM
static final Item IDENTIFIER_ITEM
The item containing the bundle identifier inBUNDLE_TYPE
. The key isIDENTIFIER
and the the type isSimpleType.LONG
.
-
SYMBOLIC_NAME
static final java.lang.String SYMBOLIC_NAME
The key SYMBOLIC_NAME, used inSYMBOLIC_NAME_ITEM
.- See Also:
- Constant Field Values
-
SYMBOLIC_NAME_ITEM
static final Item SYMBOLIC_NAME_ITEM
The item containing the symbolic name inBUNDLE_TYPE
. The key isSYMBOLIC_NAME
and the the type isSimpleType.STRING
.
-
VERSION
static final java.lang.String VERSION
The key VERSION, used inVERSION_ITEM
.- See Also:
- Constant Field Values
-
VERSION_ITEM
static final Item VERSION_ITEM
The item containing the symbolic name inBUNDLE_TYPE
. The key isSYMBOLIC_NAME
and the the type isSimpleType.STRING
.
-
START_LEVEL
static final java.lang.String START_LEVEL
The key START_LEVEL, used inSTART_LEVEL_ITEM
.- See Also:
- Constant Field Values
-
START_LEVEL_ITEM
static final Item START_LEVEL_ITEM
The item containing the start level inBUNDLE_TYPE
. The key isSTART_LEVEL
and the the type isSimpleType.INTEGER
.
-
STATE
static final java.lang.String STATE
The key STATE, used inSTATE_ITEM
.- See Also:
- Constant Field Values
-
INSTALLED
static final java.lang.String INSTALLED
Constant INSTALLED for theSTATE
- See Also:
- Constant Field Values
-
RESOLVED
static final java.lang.String RESOLVED
Constant RESOLVED for theSTATE
- See Also:
- Constant Field Values
-
STARTING
static final java.lang.String STARTING
Constant STARTING for theSTATE
- See Also:
- Constant Field Values
-
ACTIVE
static final java.lang.String ACTIVE
Constant ACTIVE for theSTATE
- See Also:
- Constant Field Values
-
STOPPING
static final java.lang.String STOPPING
Constant STOPPING for theSTATE
- See Also:
- Constant Field Values
-
UNINSTALLED
static final java.lang.String UNINSTALLED
Constant UNINSTALLED for theSTATE
- See Also:
- Constant Field Values
-
UNKNOWN
static final java.lang.String UNKNOWN
Constant UNKNOWN for theSTATE
- See Also:
- Constant Field Values
-
STATE_ITEM
static final Item STATE_ITEM
The item containing the bundle state inBUNDLE_TYPE
. The key isSTATE
and the the type isSimpleType.STRING
. The returned values must be one of the following strings:
-
LAST_MODIFIED
static final java.lang.String LAST_MODIFIED
The key LAST_MODIFIED, used inLAST_MODIFIED_ITEM
.- See Also:
- Constant Field Values
-
LAST_MODIFIED_ITEM
static final Item LAST_MODIFIED_ITEM
The item containing the last modified time in theBUNDLE_TYPE
. The key isLAST_MODIFIED
and the the type isSimpleType.LONG
.
-
ACTIVATION_POLICY_USED
static final java.lang.String ACTIVATION_POLICY_USED
The key ACTIVATION_POLICY_USED, used inACTIVATION_POLICY_USED_ITEM
.- See Also:
- Constant Field Values
-
ACTIVATION_POLICY_USED_ITEM
static final Item ACTIVATION_POLICY_USED_ITEM
The item containing the indication whether the bundle activation policy must be used inBUNDLE_TYPE
. The key isACTIVATION_POLICY_USED
and the type isSimpleType.BOOLEAN
.
-
PERSISTENTLY_STARTED
static final java.lang.String PERSISTENTLY_STARTED
The key PERSISTENTLY_STARTED, used inPERSISTENTLY_STARTED_ITEM
.- See Also:
- Constant Field Values
-
PERSISTENTLY_STARTED_ITEM
static final Item PERSISTENTLY_STARTED_ITEM
The item containing the indication of persistently started inBUNDLE_TYPE
. The key isPERSISTENTLY_STARTED
and the the type isSimpleType.BOOLEAN
.
-
REMOVAL_PENDING
static final java.lang.String REMOVAL_PENDING
The key REMOVAL_PENDING, used inREMOVAL_PENDING_ITEM
.- See Also:
- Constant Field Values
-
REMOVAL_PENDING_ITEM
static final Item REMOVAL_PENDING_ITEM
The item containing the indication of removal pending inBUNDLE_TYPE
. The key isREMOVAL_PENDING
and the type isSimpleType.BOOLEAN
.
-
REQUIRED
static final java.lang.String REQUIRED
The key REQUIRED, used inREQUIRED_ITEM
.- See Also:
- Constant Field Values
-
REQUIRED_ITEM
static final Item REQUIRED_ITEM
The item containing the required status inBUNDLE_TYPE
. The key isREQUIRED
and the the type isSimpleType.BOOLEAN
.
-
FRAGMENT
static final java.lang.String FRAGMENT
The key FRAGMENT, used inFRAGMENT_ITEM
.- See Also:
- Constant Field Values
-
FRAGMENT_ITEM
static final Item FRAGMENT_ITEM
The item containing the fragment status inBUNDLE_TYPE
. The key isFRAGMENT
and the the type isSimpleType.BOOLEAN
.
-
REGISTERED_SERVICES
static final java.lang.String REGISTERED_SERVICES
The key REGISTERED_SERVICES, used inREGISTERED_SERVICES_ITEM
.- See Also:
- Constant Field Values
-
REGISTERED_SERVICES_ITEM
static final Item REGISTERED_SERVICES_ITEM
The item containing the registered services of the bundle inBUNDLE_TYPE
. The key isREGISTERED_SERVICES
and the the type isJmxConstants.LONG_ARRAY_TYPE
.
-
SERVICES_IN_USE
static final java.lang.String SERVICES_IN_USE
The key SERVICES_IN_USE, used inSERVICES_IN_USE_ITEM
.- See Also:
- Constant Field Values
-
SERVICES_IN_USE_ITEM
static final Item SERVICES_IN_USE_ITEM
The item containing the services in use by this bundle inBUNDLE_TYPE
. The key isSERVICES_IN_USE
and the the type isJmxConstants.LONG_ARRAY_TYPE
.
-
HEADERS
static final java.lang.String HEADERS
The key HEADERS, used inHEADERS_ITEM
.- See Also:
- Constant Field Values
-
HEADERS_ITEM
static final Item HEADERS_ITEM
The item containing the bundle headers inBUNDLE_TYPE
. The key isHEADERS
and the the type isHEADERS_TYPE
.
-
EXPORTED_PACKAGES
static final java.lang.String EXPORTED_PACKAGES
The key EXPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM
.- See Also:
- Constant Field Values
-
EXPORTED_PACKAGES_ITEM
static final Item EXPORTED_PACKAGES_ITEM
The item containing the exported package names inBUNDLE_TYPE
.The key isEXPORTED_PACKAGES
and the the type isJmxConstants.STRING_ARRAY_TYPE
.
-
IMPORTED_PACKAGES
static final java.lang.String IMPORTED_PACKAGES
The key IMPORTED_PACKAGES, used inEXPORTED_PACKAGES_ITEM
.- See Also:
- Constant Field Values
-
IMPORTED_PACKAGES_ITEM
static final Item IMPORTED_PACKAGES_ITEM
The item containing the imported package names inBUNDLE_TYPE
.The key isIMPORTED_PACKAGES
and the the type isJmxConstants.STRING_ARRAY_TYPE
.
-
FRAGMENTS
static final java.lang.String FRAGMENTS
The key FRAGMENTS, used inFRAGMENTS_ITEM
.- See Also:
- Constant Field Values
-
FRAGMENTS_ITEM
static final Item FRAGMENTS_ITEM
The item containing the list of fragments the bundle is host to inBUNDLE_TYPE
. The key isFRAGMENTS
and the type isJmxConstants.LONG_ARRAY_TYPE
.
-
HOSTS
static final java.lang.String HOSTS
The key HOSTS, used inHOSTS_ITEM
.- See Also:
- Constant Field Values
-
HOSTS_ITEM
static final Item HOSTS_ITEM
The item containing the bundle identifiers representing the hosts inBUNDLE_TYPE
. The key isHOSTS
and the type isJmxConstants.LONG_ARRAY_TYPE
-
REQUIRED_BUNDLES
static final java.lang.String REQUIRED_BUNDLES
The key REQUIRED_BUNDLES, used inREQUIRED_BUNDLES_ITEM
.- See Also:
- Constant Field Values
-
REQUIRED_BUNDLES_ITEM
static final Item REQUIRED_BUNDLES_ITEM
The item containing the required bundles inBUNDLE_TYPE
. The key isREQUIRED_BUNDLES
and the type isJmxConstants.LONG_ARRAY_TYPE
-
REQUIRING_BUNDLES
static final java.lang.String REQUIRING_BUNDLES
The key REQUIRING_BUNDLES, used inREQUIRING_BUNDLES_ITEM
.- See Also:
- Constant Field Values
-
REQUIRING_BUNDLES_ITEM
static final Item REQUIRING_BUNDLES_ITEM
The item containing the bundles requiring this bundle inBUNDLE_TYPE
. The key isREQUIRING_BUNDLES
and the type isJmxConstants.LONG_ARRAY_TYPE
-
EVENT
static final java.lang.String EVENT
The key EVENT, used inEVENT_ITEM
.- See Also:
- Constant Field Values
-
EVENT_ITEM
static final Item EVENT_ITEM
The item containing the event type. The key isEVENT
and the type isSimpleType.INTEGER
-
BUNDLE_EVENT_TYPE
static final javax.management.openmbean.CompositeType BUNDLE_EVENT_TYPE
The Composite Type that represents a bundle event. This composite consists of:
-
BUNDLE_TYPE
static final javax.management.openmbean.CompositeType BUNDLE_TYPE
The Composite Type that represents a bundle. This composite consist of:EXPORTED_PACKAGES
FRAGMENT
FRAGMENTS
HEADERS
HOSTS
IDENTIFIER
IMPORTED_PACKAGES
LAST_MODIFIED
LOCATION
ACTIVATION_POLICY_USED
PERSISTENTLY_STARTED
REGISTERED_SERVICES
REMOVAL_PENDING
REQUIRED
REQUIRED_BUNDLES
REQUIRING_BUNDLES
START_LEVEL
STATE
SERVICES_IN_USE
SYMBOLIC_NAME
VERSION
BUNDLES_TYPE
.
-
BUNDLES_TYPE
static final javax.management.openmbean.TabularType BUNDLES_TYPE
The Tabular Type for a list of bundles. The row type isBUNDLE_TYPE
and the index isIDENTIFIER
.
-
-
Method Detail
-
getBundle
javax.management.openmbean.CompositeData getBundle(long id) throws java.io.IOException
New!!- Parameters:
id
- The Bundle ID- Returns:
- The Bundle Data
- Throws:
java.io.IOException
-
getBundleIds
long[] getBundleIds() throws java.io.IOException
- Throws:
java.io.IOException
-
getRequiredBundles
long[] getRequiredBundles(long bundleIdentifier) throws java.io.IOException
Answer the list of identifiers of the bundles this bundle depends upon- Parameters:
bundleIdentifier
- the bundle identifier- Returns:
- the list of bundle identifiers
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
listBundles
javax.management.openmbean.TabularData listBundles() throws java.io.IOException
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:
java.io.IOException
-
listBundles
javax.management.openmbean.TabularData listBundles(java.lang.String... items) throws java.io.IOException
- Throws:
java.io.IOException
-
getExportedPackages
java.lang.String[] getExportedPackages(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getFragments
long[] getFragments(long bundleId) throws java.io.IOException
Answer the list of the bundle ids of the fragments associated with this bundle- Parameters:
bundleId
-- Returns:
- the array of bundle identifiers
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getHeaders
javax.management.openmbean.TabularData getHeaders(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getHeaders
javax.management.openmbean.TabularData getHeaders(long bundleId, java.lang.String locale) throws java.io.IOException
- Throws:
java.io.IOException
-
getHeader
java.lang.String getHeader(long bundleId, java.lang.String key) throws java.io.IOException
- Throws:
java.io.IOException
-
getHeader
java.lang.String getHeader(long bundleId, java.lang.String key, java.lang.String locale) throws java.io.IOException
- Throws:
java.io.IOException
-
getHosts
long[] getHosts(long fragment) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getImportedPackages
java.lang.String[] getImportedPackages(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getLastModified
long getLastModified(long bundleId) throws java.io.IOException
Answer the last modified time of a bundle- Parameters:
bundleId
- the unique identifier of a bundle- Returns:
- the last modified time
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getRegisteredServices
long[] getRegisteredServices(long bundleId) throws java.io.IOException
Answer the list of service identifiers representing the services this bundle exports- Parameters:
bundleId
- the bundle identifier- Returns:
- the list of service identifiers
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getRequiringBundles
long[] getRequiringBundles(long bundleIdentifier) throws java.io.IOException
Answer the list of identifiers of the bundles which require this bundle- Parameters:
bundleIdentifier
- the bundle identifier- Returns:
- the list of bundle identifiers
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getServicesInUse
long[] getServicesInUse(long bundleIdentifier) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getStartLevel
int getStartLevel(long bundleId) throws java.io.IOException
Answer the start level of the bundle- Parameters:
bundleId
- the identifier of the bundle- Returns:
- the start level
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getState
java.lang.String getState(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getSymbolicName
java.lang.String getSymbolicName(long bundleId) throws java.io.IOException
Answer the symbolic name of the bundle- Parameters:
bundleId
- the identifier of the bundle- Returns:
- the symbolic name
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
isActivationPolicyUsed
boolean isActivationPolicyUsed(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
isPersistentlyStarted
boolean isPersistentlyStarted(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
isFragment
boolean isFragment(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
isRemovalPending
boolean isRemovalPending(long bundleId) throws java.io.IOException
Answer true if the bundle is pending removal- Parameters:
bundleId
- the identifier of the bundle- Returns:
- true if the bundle is pending removal
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
isRequired
boolean isRequired(long bundleId) throws java.io.IOException
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:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getLocation
java.lang.String getLocation(long bundleId) throws java.io.IOException
Answer the location of the bundle.- Parameters:
bundleId
- the identifier of the bundle- Returns:
- The location string of this bundle
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
getVersion
java.lang.String getVersion(long bundleId) throws java.io.IOException
Answer the location of the bundle.- Parameters:
bundleId
- the identifier of the bundle- Returns:
- The location string of this bundle
- Throws:
java.io.IOException
- if the operation failsjava.lang.IllegalArgumentException
- if the bundle indicated does not exist
-
-