org.jboss.osgi.jmx
Interface BundleStateMBeanExt

All Superinterfaces:
org.osgi.jmx.framework.BundleStateMBean

public interface BundleStateMBeanExt
extends org.osgi.jmx.framework.BundleStateMBean

An extension to BundleStateMBean.

Since:
24-Feb-2010
Author:
thomas.diesler@jboss.com

Field Summary
static String OBJECTNAME
          The default object name: jboss.osgi:service=jmx,type=BundleState
 
Fields inherited from interface org.osgi.jmx.framework.BundleStateMBean
ACTIVE, BUNDLE_EVENT_TYPE, BUNDLE_TYPE, BUNDLES_TYPE, EVENT, EVENT_ITEM, EXPORTED_PACKAGES, EXPORTED_PACKAGES_ITEM, FRAGMENT, FRAGMENT_ITEM, FRAGMENTS, FRAGMENTS_ITEM, HEADER_TYPE, HEADERS, HEADERS_ITEM, HEADERS_TYPE, HOSTS, HOSTS_ITEM, IDENTIFIER, IDENTIFIER_ITEM, IMPORTED_PACKAGES, IMPORTED_PACKAGES_ITEM, INSTALLED, KEY, KEY_ITEM, LAST_MODIFIED, LAST_MODIFIED_ITEM, LOCATION, LOCATION_ITEM, PERSISTENTLY_STARTED, PERSISTENTLY_STARTED_ITEM, REGISTERED_SERVICES, REGISTERED_SERVICES_ITEM, REMOVAL_PENDING, REMOVAL_PENDING_ITEM, REQUIRED, REQUIRED_BUNDLES, REQUIRED_BUNDLES_ITEM, REQUIRED_ITEM, REQUIRING_BUNDLES, REQUIRING_BUNDLES_ITEM, RESOLVED, SERVICES_IN_USE, SERVICES_IN_USE_ITEM, START_LEVEL, START_LEVEL_ITEM, STARTING, STATE, STATE_ITEM, STOPPING, SYMBOLIC_NAME, SYMBOLIC_NAME_ITEM, UNINSTALLED, UNKNOWN, VALUE, VALUE_ITEM, VERSION, VERSION_ITEM
 
Method Summary
 CompositeData getBundle(long bundleId)
          Answer the bundle state for a single bundle.
 String getDataFile(long bundleId, String filename)
          Get the string encoded file path in the persistent storage area provided for the given bundle.
 String getEntry(long bundleId, String path)
          Returns a string encoded URL to the entry at the specified path in the given bundle.
 TabularData getHeaders(long bundleId, String locale)
          Answer the headers for the bundle uniquely identified by the bundle id.
 CompositeData getProperty(long bundleId, String key)
          Answer the map of properties associated with this bundle
 String getResource(long bundleId, String name)
          Find the specified resource from the given bundle's class loader.
 long loadClass(long bundleId, String name)
          Loads the specified class using the class loader of the bundle with the given identifier.
 
Methods inherited from interface org.osgi.jmx.framework.BundleStateMBean
getExportedPackages, getFragments, getHeaders, getHosts, getImportedPackages, getLastModified, getLocation, getRegisteredServices, getRequiredBundles, getRequiringBundles, getServicesInUse, getStartLevel, getState, getSymbolicName, getVersion, isFragment, isPersistentlyStarted, isRemovalPending, isRequired, listBundles
 

Field Detail

OBJECTNAME

static final String OBJECTNAME
The default object name: jboss.osgi:service=jmx,type=BundleState

See Also:
Constant Field Values
Method Detail

getBundle

CompositeData getBundle(long bundleId)
                        throws IOException
Answer the bundle state for a single bundle. Composite Data that is type by BundleStateMBean.BUNDLE_TYPE. https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1598

Parameters:
bundleId - the bundle identifier
Returns:
The composite bundle information
Throws:
IOException - if the operation fails
IllegalArgumentException - if the bundle indicated does not exist

getHeaders

TabularData getHeaders(long bundleId,
                       String locale)
                       throws IOException
Answer the headers for the bundle uniquely identified by the bundle id. The Tabular Data is typed by the BundleStateMBean.HEADERS_TYPE. https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1599

Parameters:
bundleId - the unique identifier of the bundle
locale - The locale name into which the header values are to be localized.
Throws:
IOException - if the operation fails
IllegalArgumentException - if the bundle indicated does not exist

getProperty

CompositeData getProperty(long bundleId,
                          String key)
                          throws IOException
Answer the map of properties associated with this bundle

Parameters:
bundleId - the unique identifier of the bundle
key - The name of the requested property.
Returns:
the property data, or null if the property is undefined.
Throws:
IOException - if the operation fails
IllegalArgumentException - if the bundle indicated does not exist
See Also:
for the details of the CompositeType https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1600

loadClass

long loadClass(long bundleId,
               String name)
               throws ClassNotFoundException,
                      IOException
Loads the specified class using the class loader of the bundle with the given identifier. https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1601

Parameters:
bundleId - the unique identifier of the bundle
name - The name of the class to load
Returns:
The bundle id of the bundle that loaded the class.
Throws:
ClassNotFoundException - If no such class can be found or if the given bundle is a fragment bundle
IOException

getEntry

String getEntry(long bundleId,
                String path)
                throws IOException
Returns a string encoded URL to the entry at the specified path in the given bundle. https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1601

Parameters:
bundleId - the unique identifier of the bundle
path - The path name of the entry
Returns:
A URL to the entry, or null if no entry could be found
Throws:
IOException

getResource

String getResource(long bundleId,
                   String name)
                   throws IOException
Find the specified resource from the given bundle's class loader. https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1601

Parameters:
bundleId - the unique identifier of the bundle
name - The name of the resource.
Returns:
A string encoded URL to the named resource, or null if the resource could not be found
Throws:
IOException

getDataFile

String getDataFile(long bundleId,
                   String filename)
                   throws IOException
Get the string encoded file path in the persistent storage area provided for the given bundle. https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1601

Parameters:
bundleId - the unique identifier of the bundle
filename - A relative name to the file to be accessed
Throws:
IOException


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.