X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FBrokerActivator.java;h=3af645a2b8a48753b79659f58877c1044ff83394;hp=2bab4dbd26ca5896f3703978171e5ff72274b9db;hb=6f272b58bfdd5ab7f01a2ac837d1b12adef36f58;hpb=a1b55fb491e235c028e1d451aff4b1d261d5a86c diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java index 2bab4dbd26..3af645a2b8 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java @@ -6,6 +6,10 @@ import org.opendaylight.controller.sal.core.api.Broker; import org.opendaylight.controller.sal.core.api.data.DataBrokerService; import org.opendaylight.controller.sal.core.api.data.DataProviderService; import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.controller.sal.core.api.mount.MountProvisionService; +import org.opendaylight.controller.sal.core.api.mount.MountService; +import org.opendaylight.controller.sal.dom.broker.impl.HashMapDataStore; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; @@ -13,6 +17,7 @@ import org.osgi.framework.ServiceRegistration; public class BrokerActivator implements BundleActivator { + private static final InstanceIdentifier ROOT = InstanceIdentifier.builder().toInstance(); BrokerImpl broker; private ServiceRegistration brokerReg; private ServiceRegistration schemaReg; @@ -20,13 +25,17 @@ public class BrokerActivator implements BundleActivator { private ServiceRegistration dataProviderReg; private SchemaServiceImpl schemaService; private DataBrokerImpl dataService; + private MountPointManagerImpl mountService; + private ServiceRegistration mountReg; + private ServiceRegistration mountProviderReg; + private HashMapDataStore hashMapStore; @Override public void start(BundleContext context) throws Exception { Hashtable emptyProperties = new Hashtable(); broker = new BrokerImpl(); broker.setBundleContext(context); - brokerReg = context.registerService(Broker.class, broker, emptyProperties); + schemaService = new SchemaServiceImpl(); schemaService.setContext(context); @@ -35,10 +44,24 @@ public class BrokerActivator implements BundleActivator { schemaReg = context.registerService(SchemaService.class, schemaService, new Hashtable()); dataService = new DataBrokerImpl(); + dataService.setExecutor(broker.getExecutor()); + dataReg = context.registerService(DataBrokerService.class, dataService, emptyProperties); dataProviderReg = context.registerService(DataProviderService.class, dataService, emptyProperties); + hashMapStore = new HashMapDataStore(); + + dataService.registerConfigurationReader(ROOT, hashMapStore); + dataService.registerCommitHandler(ROOT, hashMapStore); + dataService.registerOperationalReader(ROOT, hashMapStore); + mountService = new MountPointManagerImpl(); + mountService.setDataBroker(dataService); + + mountReg = context.registerService(MountService.class, mountService, emptyProperties); + mountProviderReg = context.registerService(MountProvisionService.class, mountService, emptyProperties); + + brokerReg = context.registerService(Broker.class, broker, emptyProperties); } @Override