use of org.apache.aries.jmx.codec.BundleData in project aries by apache.
the class BundleState method getBundle.
public CompositeData getBundle(long id) throws IOException {
Bundle bundle = bundleContext.getBundle(id);
if (bundle == null)
return null;
BundleData data = new BundleData(bundleContext, bundle, packageAdmin, startLevel);
return data.toCompositeData();
}
use of org.apache.aries.jmx.codec.BundleData in project aries by apache.
the class BundleState method listBundles.
private TabularData listBundles(Collection<String> items) throws IOException {
Bundle[] containerBundles = bundleContext.getBundles();
List<BundleData> bundleDatas = new ArrayList<BundleData>();
if (containerBundles != null) {
for (Bundle containerBundle : containerBundles) {
bundleDatas.add(new BundleData(bundleContext, containerBundle, packageAdmin, startLevel));
}
}
TabularData bundleTable = new TabularDataSupport(BUNDLES_TYPE);
for (BundleData bundleData : bundleDatas) {
bundleTable.put(bundleData.toCompositeData(items));
}
return bundleTable;
}
Aggregations