1 package org.opendaylight.controller.sal.dom.broker.osgi;
3 import java.util.Hashtable;
5 import org.opendaylight.controller.sal.core.api.model.SchemaService;
6 import org.opendaylight.controller.sal.dom.broker.GlobalBundleScanningSchemaServiceImpl;
7 import org.osgi.framework.BundleActivator;
8 import org.osgi.framework.BundleContext;
9 import org.osgi.framework.ServiceRegistration;
11 public class SchemaServiceActivator implements BundleActivator {
14 private ServiceRegistration<SchemaService> schemaServiceReg;
15 private GlobalBundleScanningSchemaServiceImpl schemaService;
18 public void start(BundleContext context) throws Exception {
19 schemaService = new GlobalBundleScanningSchemaServiceImpl();
20 schemaService.setContext(context);
21 schemaService.start();
22 schemaServiceReg = context.registerService(SchemaService.class, schemaService, new Hashtable<String,String>());
26 public void stop(BundleContext context) throws Exception {
27 schemaServiceReg.unregister();
28 schemaService.close();