- private class ConfigRegistryLookupThread extends Thread {
- private final YangStoreService yangStoreService;
-
- private ConfigRegistryLookupThread(YangStoreService yangStoreService) {
- super("config-registry-lookup");
- this.yangStoreService = yangStoreService;
- }
-
- @Override
- public void run() {
- NetconfOperationServiceFactoryImpl factory = new NetconfOperationServiceFactoryImpl(yangStoreService);
- logger.debug("Registering into OSGi");
- osgiRegistration = context.registerService(new String[]{NetconfOperationServiceFactory.class.getName()}, factory,
- new Hashtable<String, Object>());
- }
+ private ServiceRegistration<NetconfOperationServiceFactory> startNetconfServiceFactory(final ConfigSubsystemFacadeFactory configSubsystemFacade, final BundleContext context) {
+ final NetconfOperationServiceFactoryImpl netconfOperationServiceFactory = new NetconfOperationServiceFactoryImpl(configSubsystemFacade);
+ // Add properties to autowire with netconf-impl instance for cfg subsystem
+ final Dictionary<String, String> properties = new Hashtable<>();
+ properties.put(NetconfConstants.SERVICE_NAME, NetconfConstants.CONFIG_NETCONF_CONNECTOR);
+ return context.registerService(NetconfOperationServiceFactory.class, netconfOperationServiceFactory, properties);