Package io.hawt.osgi.jmx
Class OSGiTools
- java.lang.Object
-
- io.hawt.osgi.jmx.OSGiTools
-
- All Implemented Interfaces:
OSGiToolsMXBean
public class OSGiTools extends Object implements OSGiToolsMXBean
-
-
Method Summary
All Methods Instance Methods Concrete 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
public long getLoadClassOrigin(long bundleID, String clazz)Description copied from interface:OSGiToolsMXBeanReturns from what bundle the given class was loaded, when requested in the context of a certain bundle.- Specified by:
getLoadClassOriginin interfaceOSGiToolsMXBean- 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.
-
getResourceURL
public String getResourceURL(long bundleID, String resource)
Description copied from interface:OSGiToolsMXBeanReturns the URL where the requested resource was found, when looked up in the context of a certain bundle.- Specified by:
getResourceURLin interfaceOSGiToolsMXBean- 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.
-
-