- 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);
- LOG.debug("Registering into OSGi");
- Dictionary<String, String> properties = new Hashtable<>();
- properties.put(NetconfConstants.SERVICE_NAME, NetconfConstants.CONFIG_NETCONF_CONNECTOR);
- osgiRegistration = context.registerService(NetconfOperationServiceFactory.class, factory, properties);
- }
+ 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);