Package io.hawt.osgi.jmx
Interface OSGiToolsMXBean
-
- All Known Implementing Classes:
OSGiTools
public interface OSGiToolsMXBean
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetLoadClassOrigin(long bundleID, String clazz)Returns from what bundle the given class was loaded, when requested in the context of a certain bundle.StringgetResourceURL(long bundleID, String resource)Returns the URL where the requested resource was found, when looked up in the context of a certain bundle.
-
-
-
Method Detail
-
getLoadClassOrigin
long getLoadClassOrigin(long bundleID, String clazz)Returns from what bundle the given class was loaded, when requested in the context of a certain bundle.- Parameters:
bundleID- The bundle to load the class from.clazz- The class name to load.- Returns:
- The bundle that served the class or -1 if the class could not be loaded.
- Throws:
IllegalArgumentException- if an invalid bundle ID is provided.
-
getResourceURL
String getResourceURL(long bundleID, String resource)
Returns the URL where the requested resource was found, when looked up in the context of a certain bundle.- Parameters:
bundleID- The bundle to load the class from.resource- The resource name to load. The format is as defined inClassLoader.getResource.- Returns:
- The URL where the bundle with bundleID can find the resource in String form. If the resource
cannot be found
nullis returned. - Throws:
IllegalArgumentException- if an invalid bundle ID is provided.
-
-