@Override public void modifiedBundle(Bundle b, BundleEvent event, Object object) { if (b instanceof CompositeBundle) { customizedProcessBundle(this, b, event, false); } else { // Delegate to our customizer for normal bundles if (customizer != null) { customizer.modifiedBundle(b, event, object); } } }
compositeTracker = new InternalRecursiveBundleTracker(context, stateMask, customizer, tracker == null); } else { compositeTracker = null;
openTracker(btc, cb, bundleScope, mask); openTracker(btc, cb, bundleScope, mask);
private synchronized void openTracker(BundleTrackerCustomizer btc, CompositeBundle cb, String bundleScope, int stateMask) { // let's process each of the bundle in the CompositeBundle BundleContext compositeBundleContext = cb.getCompositeFramework().getBundleContext(); String bundleId = cb.getSymbolicName()+"/"+cb.getVersion(); if (alreadyRecursedContexts.putIfAbsent(bundleId, bundleId) == null) { // let's track each of the bundle in the CompositeBundle BundleTracker bt = new InternalRecursiveBundleTracker(compositeBundleContext, stateMask, customizer, true); bt.open(); BundleTrackerFactory.registerBundleTracker(bundleScope, bt); } } }
@Override public void removedBundle(Bundle b, BundleEvent event, Object object) { if (b instanceof CompositeBundle) { customizedProcessBundle(this, b, event, true); } else { if (customizer != null) { customizer.removedBundle(b, event, object); } } }
@Override public Object addingBundle(Bundle b, BundleEvent event) { Object o = null; if (b instanceof CompositeBundle) { customizedProcessBundle(this, b, event, false); o = b; } else if (nested) { // Delegate to our customizer for normal bundles if (customizer != null) { o = customizer.addingBundle(b, event); } } return o; }