Search in sources :

Example 11 with BundleTracker

use of org.osgi.util.tracker.BundleTracker in project aries by apache.

the class InternalRecursiveBundleTracker method openTracker.

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);
    }
}
Also used : BundleTracker(org.osgi.util.tracker.BundleTracker) BundleContext(org.osgi.framework.BundleContext)

Aggregations

BundleTracker (org.osgi.util.tracker.BundleTracker)11 Bundle (org.osgi.framework.Bundle)7 BundleEvent (org.osgi.framework.BundleEvent)4 BundleTrackerCustomizer (org.osgi.util.tracker.BundleTrackerCustomizer)3 RecursiveBundleTracker (org.apache.aries.util.tracker.RecursiveBundleTracker)2 BundleContext (org.osgi.framework.BundleContext)2 ServiceReference (org.osgi.framework.ServiceReference)2 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 Hashtable (java.util.Hashtable)1 List (java.util.List)1 NamespaceHandlerRegistryImpl (org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl)1 ScheduledExecutorServiceWrapper (org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper)1 ScheduledExecutorServiceFactory (org.apache.aries.blueprint.utils.threading.ScheduledExecutorServiceWrapper.ScheduledExecutorServiceFactory)1 ProxyManager (org.apache.aries.proxy.ProxyManager)1 HelloIsolation (org.apache.aries.subsystem.example.helloIsolation.HelloIsolation)1 InstallInfo (org.apache.aries.subsystem.scope.InstallInfo)1 Scope (org.apache.aries.subsystem.scope.Scope)1 ScopeUpdate (org.apache.aries.subsystem.scope.ScopeUpdate)1