org.osgi.jmx.core
Interface BundleStateMBean


public interface BundleStateMBean

Author:
Hal Hildebrand Date: Sep 23, 2008 Time: 7:27:21 AM

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.

See OSGiBundleEvent for the precise definition of the CompositeData for the notification sent.


Field Summary
static java.lang.String[] BUNDLE
          The item names in the CompositeData representing an OSGi Bundle
static java.lang.String[] BUNDLE_EVENT
          The item names in the CompositeData representing the event raised for bundle events within the OSGi container by this bean
static java.lang.String BUNDLE_EVENT_TYPE
          The type of the event which is emitted when bundle state changes occur in the OSGi container
static java.lang.String BUNDLE_EXPORTED_PACKAGES
          The name of the item containing the exported packages in the CompositeData
static java.lang.String BUNDLE_FRAGMENT
          The name of the item containing the fragment status in the CompositeData
static java.lang.String BUNDLE_FRAGMENTS
          The name of the item containing the list of fragments the bundle is host to in the CompositeData representing a Bundle
static java.lang.String BUNDLE_HEADER_TYPE
           
static java.lang.String BUNDLE_HEADERS
          The name of the item containing the bundle headers in the CompositeData
static java.lang.String BUNDLE_HEADERS_TYPE
           
static java.lang.String BUNDLE_HOSTS
          The name of the item containing the bundle identifiers representing the hosts
static java.lang.String BUNDLE_ID
          The name of the item containing the bundle identifier in the CompositeData
static java.lang.String BUNDLE_IMPORTED_PACKAGES
          The name of the item containing the imported packages in the CompositeData
static java.lang.String BUNDLE_LAST_MODIFIED
          The name of the item containing the last modified time in the CompositeData
static java.lang.String BUNDLE_LOCATION
          The name of the item containing the bundle location in the CompositeData
static java.lang.String BUNDLE_PERSISTENTLY_STARTED
          The name of the item containing the indication of persistently started in the CompositeData
static java.lang.String BUNDLE_REGISTERED_SERVICES
          The name of the item containing the registered services of the bundle in the CompositeData
static java.lang.String BUNDLE_REMOVAL_PENDING
          The name of the item containing the indication of removal pending in the CompositeData
static java.lang.String BUNDLE_REQUIRED
          The name of the item containing the required status in the CompositeData
static java.lang.String BUNDLE_REQUIRED_BUNDLES
          The name of the item containing the required bundles in the CompositeData
static java.lang.String BUNDLE_REQUIRING_BUNDLES
          The name of the item containing the bundles requiring this bundle in the CompositeData
static java.lang.String BUNDLE_SERVICES_IN_USE
          The name of the item containing the services in use by this bundle in the CompositeData
static java.lang.String BUNDLE_START_LEVEL
          The name of the item containing the start level in the CompositeData
static java.lang.String BUNDLE_STATE
          The name of the item containing the bundle state in the CompositeData
static java.lang.String BUNDLE_SYMBOLIC_NAME
          The name of the item containing the symbolic name in the CompositeData
static java.lang.String BUNDLE_TYPE_NAME
          The name CompositeData type for a bundle
static java.lang.String EVENT_TYPE
          The name of the item containing the event type in the CompositeData
 
Method Summary
 javax.management.openmbean.TabularData getBundles()
          Answer the bundle state of the system in tabular form Each row of the returned table represents a single bundle.
 long[] getDependencies(long bundleIdentifier)
          Answer the list of identifiers of the bundles this bundle depends upon
 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 bundle
 javax.management.openmbean.TabularData getHeaders(long bundleId)
          Answer the headers for the bundle uniquely identified by the bundle id
 long[] getHosts(long fragment)
          Answer the list of bundle ids of the bundles which host a fragment
 java.lang.String[] getImportedPackages(long bundleId)
          Answer the array of the packages imported by this bundle
 long getLastModified(long bundleId)
          Answer the last modified time of a bundle
 long[] getRegisteredServices(long bundleId)
          Answer the list of service identifiers representing the services this bundle exports
 long[] getRequiringBundles(long bundleIdentifier)
          Answer the list of identifiers of the bundles which require this bundle
 long[] getServicesInUse(long bundleIdentifier)
          Answer the list of service identifiers which refer to the the services this bundle is using
 int getStartLevel(long bundleId)
          Answer the start level of the bundle
 java.lang.String getState(long bundleId)
          Answer the symbolic name of the state of the bundle
 java.lang.String getSymbolicName(long bundleId)
          Answer the symbolic name of the bundle
 boolean isFragment(long bundleId)
          Answer whether the bundle is a fragment or not
 boolean isPersistentlyStarted(long bundleId)
          Answer if the bundle is persistently started when its start level is reached
 boolean isRemovalPending(long bundleId)
          Answer true if the bundle is pending removal
 boolean isRequired(long bundleId)
          Answer true if the bundle is required by another bundle
 

Field Detail

BUNDLE_EVENT_TYPE

static final java.lang.String BUNDLE_EVENT_TYPE
The type of the event which is emitted when bundle state changes occur in the OSGi container

See Also:
Constant Field Values

BUNDLE_EXPORTED_PACKAGES

static final java.lang.String BUNDLE_EXPORTED_PACKAGES
The name of the item containing the exported packages in the CompositeData

See Also:
Constant Field Values

BUNDLE_FRAGMENT

static final java.lang.String BUNDLE_FRAGMENT
The name of the item containing the fragment status in the CompositeData

See Also:
Constant Field Values

BUNDLE_FRAGMENTS

static final java.lang.String BUNDLE_FRAGMENTS
The name of the item containing the list of fragments the bundle is host to in the CompositeData representing a Bundle

See Also:
Constant Field Values

BUNDLE_HEADERS

static final java.lang.String BUNDLE_HEADERS
The name of the item containing the bundle headers in the CompositeData

See Also:
Constant Field Values

BUNDLE_HOSTS

static final java.lang.String BUNDLE_HOSTS
The name of the item containing the bundle identifiers representing the hosts

See Also:
Constant Field Values

BUNDLE_ID

static final java.lang.String BUNDLE_ID
The name of the item containing the bundle identifier in the CompositeData

See Also:
Constant Field Values

BUNDLE_IMPORTED_PACKAGES

static final java.lang.String BUNDLE_IMPORTED_PACKAGES
The name of the item containing the imported packages in the CompositeData

See Also:
Constant Field Values

BUNDLE_LAST_MODIFIED

static final java.lang.String BUNDLE_LAST_MODIFIED
The name of the item containing the last modified time in the CompositeData

See Also:
Constant Field Values

BUNDLE_LOCATION

static final java.lang.String BUNDLE_LOCATION
The name of the item containing the bundle location in the CompositeData

See Also:
Constant Field Values

BUNDLE_PERSISTENTLY_STARTED

static final java.lang.String BUNDLE_PERSISTENTLY_STARTED
The name of the item containing the indication of persistently started in the CompositeData

See Also:
Constant Field Values

BUNDLE_REGISTERED_SERVICES

static final java.lang.String BUNDLE_REGISTERED_SERVICES
The name of the item containing the registered services of the bundle in the CompositeData

See Also:
Constant Field Values

BUNDLE_REMOVAL_PENDING

static final java.lang.String BUNDLE_REMOVAL_PENDING
The name of the item containing the indication of removal pending in the CompositeData

See Also:
Constant Field Values

BUNDLE_REQUIRED

static final java.lang.String BUNDLE_REQUIRED
The name of the item containing the required status in the CompositeData

See Also:
Constant Field Values

BUNDLE_REQUIRED_BUNDLES

static final java.lang.String BUNDLE_REQUIRED_BUNDLES
The name of the item containing the required bundles in the CompositeData

See Also:
Constant Field Values

BUNDLE_REQUIRING_BUNDLES

static final java.lang.String BUNDLE_REQUIRING_BUNDLES
The name of the item containing the bundles requiring this bundle in the CompositeData

See Also:
Constant Field Values

BUNDLE_SERVICES_IN_USE

static final java.lang.String BUNDLE_SERVICES_IN_USE
The name of the item containing the services in use by this bundle in the CompositeData

See Also:
Constant Field Values

BUNDLE_START_LEVEL

static final java.lang.String BUNDLE_START_LEVEL
The name of the item containing the start level in the CompositeData

See Also:
Constant Field Values

BUNDLE_STATE

static final java.lang.String BUNDLE_STATE
The name of the item containing the bundle state in the CompositeData

See Also:
Constant Field Values

BUNDLE_SYMBOLIC_NAME

static final java.lang.String BUNDLE_SYMBOLIC_NAME
The name of the item containing the symbolic name in the CompositeData

See Also:
Constant Field Values

BUNDLE_TYPE_NAME

static final java.lang.String BUNDLE_TYPE_NAME
The name CompositeData type for a bundle

See Also:
Constant Field Values

EVENT_TYPE

static final java.lang.String EVENT_TYPE
The name of the item containing the event type in the CompositeData

See Also:
Constant Field Values

BUNDLE

static final java.lang.String[] BUNDLE
The item names in the CompositeData representing an OSGi Bundle


BUNDLE_EVENT

static final java.lang.String[] BUNDLE_EVENT
The item names in the CompositeData representing the event raised for bundle events within the OSGi container by this bean


BUNDLE_HEADERS_TYPE

static final java.lang.String BUNDLE_HEADERS_TYPE
See Also:
Constant Field Values

BUNDLE_HEADER_TYPE

static final java.lang.String BUNDLE_HEADER_TYPE
See Also:
Constant Field Values
Method Detail

getDependencies

long[] getDependencies(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 fails
java.lang.IllegalArgumentException - if the bundle indicated does not exist

getBundles

javax.management.openmbean.TabularData getBundles()
                                                  throws java.io.IOException
Answer the bundle state of the system in tabular form Each row of the returned table represents a single bundle. For each bundle, the following row is returned

Returns:
the tabular respresentation of the bundle state
Throws:
java.io.IOException
See Also:
for the precise specifiction of the CompositeType definition for each row of the table.

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
Throws:
java.io.IOException - if the operation fails
java.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 fails
java.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

Parameters:
bundleId - - the unique identifer of the bundle
Returns:
the table of associated header key and values
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the bundle indicated does not exist
See Also:
for the precise specifiction of the TabularType

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 fails
java.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
Throws:
java.io.IOException - if the operation fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.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 fails
java.lang.IllegalArgumentException - if the bundle indicated does not exist


Copyright © 2009. All Rights Reserved.