final ModuleFactoryBundleTracker moduleFactoryTracker = new ModuleFactoryBundleTracker(
blankTransactionServiceTracker);
- final boolean scanResolvedBundlesForModuleInfo = true;
- BundleTracker<Collection<ObjectRegistration<YangModuleInfo>>> moduleInfoResolvedBundleTracker = null;
- ExtensibleBundleTracker<?> moduleFactoryBundleTracker;
- if(scanResolvedBundlesForModuleInfo) {
- moduleInfoResolvedBundleTracker = new BundleTracker<>(context, Bundle.RESOLVED | Bundle.STARTING |
- Bundle.STOPPING | Bundle.ACTIVE, moduleInfoBundleTracker);
- moduleFactoryBundleTracker = new ExtensibleBundleTracker<>(context, moduleFactoryTracker);
- } else {
- moduleFactoryBundleTracker = new ExtensibleBundleTracker<>(context,
- moduleFactoryTracker, moduleInfoBundleTracker);
- }
-
+ BundleTracker<Collection<ObjectRegistration<YangModuleInfo>>> moduleInfoResolvedBundleTracker =
+ new BundleTracker<>(context, Bundle.RESOLVED | Bundle.STARTING | Bundle.STOPPING | Bundle.ACTIVE,
+ moduleInfoBundleTracker);
+ ExtensibleBundleTracker<?> moduleFactoryBundleTracker = new ExtensibleBundleTracker<>(context,
+ moduleFactoryTracker);
moduleInfoBundleTracker.open(moduleInfoResolvedBundleTracker);
// start extensible tracker
// If the system bundle (id 0) is stopping close the ConfigRegistry so it destroys all modules. On
// shutdown the system bundle is stopped first.
- if((event.getBundle().getBundleId() == SYSTEM_BUNDLE_ID) && (event.getType() == BundleEvent.STOPPING)) {
+ if(event.getBundle().getBundleId() == SYSTEM_BUNDLE_ID && event.getType() == BundleEvent.STOPPING) {
this.configRegistry.close();
}
}