Class BundleTrackerFactory


  • public class BundleTrackerFactory
    extends java.lang.Object
    This is the factory for BundleTracker
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Collection<java.util.List<org.osgi.util.tracker.BundleTracker>> getAllBundleTracker()
      get all bundle tracker registered in this factory
      static java.util.List<org.osgi.util.tracker.BundleTracker> getBundleTrackerList​(java.lang.String bundleScope)
      get bundle tracker based on bundle name and version
      static java.util.List<org.osgi.util.tracker.BundleTracker> getBundleTrackerList​(java.lang.String symbolicName, org.osgi.framework.Version version)
      get bundle tracker based on composite bundle's symbolicName and version
      static void registerBundleTracker​(java.lang.String bundleScope, org.osgi.util.tracker.BundleTracker bt)
      register the bundle tracker
      static void unregisterAndCloseBundleTracker​(java.lang.String bundleScope)
      unregister and close the bundle tracker(s) associated with composite bundle's - SymbolicName_Version
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BundleTrackerFactory

        public BundleTrackerFactory()
    • Method Detail

      • getBundleTrackerList

        public static java.util.List<org.osgi.util.tracker.BundleTracker> getBundleTrackerList​(java.lang.String bundleScope)
        get bundle tracker based on bundle name and version
        Parameters:
        bundleScope - composite bundle's - SymbolicName_Version
        Returns:
        the list of bundle tracker associated with the bundle scope
      • getBundleTrackerList

        public static java.util.List<org.osgi.util.tracker.BundleTracker> getBundleTrackerList​(java.lang.String symbolicName,
                                                                                               org.osgi.framework.Version version)
        get bundle tracker based on composite bundle's symbolicName and version
        Parameters:
        symbolicName - composite bundle's symbolicName
        version - composite bundle's version
        Returns:
        the list of bundle tracker associated with the bundle scope
      • getAllBundleTracker

        public static java.util.Collection<java.util.List<org.osgi.util.tracker.BundleTracker>> getAllBundleTracker()
        get all bundle tracker registered in this factory
        Returns:
        all the trackers registered. The collection contains a List for each bundle scope.
      • registerBundleTracker

        public static void registerBundleTracker​(java.lang.String bundleScope,
                                                 org.osgi.util.tracker.BundleTracker bt)
        register the bundle tracker
        Parameters:
        bundleScope - composite bundle's SymbolicName_Version
        bt - the bundle tracker to be registered
      • unregisterAndCloseBundleTracker

        public static void unregisterAndCloseBundleTracker​(java.lang.String bundleScope)
        unregister and close the bundle tracker(s) associated with composite bundle's - SymbolicName_Version
        Parameters:
        bundleScope - composite bundle's - SymbolicName_Version