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%2FMountPointImpl.java;h=5a3e060a3c9a52a2c55b4876b283ec5559de63e5;hp=b4fccff3b0fe745ae71088942ed05e92429f5e0e;hb=928525541a36fac7aaa672d61417b853d08f7f6c;hpb=d3230a844c5c0c6ca6ae774672fcb97a0c5a3951 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java index b4fccff3b0..5a3e060a3c 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.dom.broker; import java.util.List; @@ -8,34 +15,34 @@ import org.opendaylight.controller.md.sal.common.api.RegistrationListener; import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler; import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration; import org.opendaylight.controller.md.sal.common.api.data.DataReader; +import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener; import org.opendaylight.controller.sal.common.DataStoreIdentifier; import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration; -import org.opendaylight.controller.sal.core.api.RpcImplementation; import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration; +import org.opendaylight.controller.sal.core.api.RpcImplementation; import org.opendaylight.controller.sal.core.api.RpcRegistrationListener; +import org.opendaylight.controller.sal.core.api.RpcRoutingContext; import org.opendaylight.controller.sal.core.api.data.DataChangeListener; import org.opendaylight.controller.sal.core.api.data.DataModificationTransaction; import org.opendaylight.controller.sal.core.api.data.DataValidator; import org.opendaylight.controller.sal.core.api.mount.MountProvisionInstance; import org.opendaylight.controller.sal.core.api.notify.NotificationListener; -import org.opendaylight.controller.sal.dom.broker.impl.DataReaderRouter; import org.opendaylight.controller.sal.dom.broker.impl.NotificationRouterImpl; -import org.opendaylight.controller.sal.dom.broker.impl.RpcRouterImpl; +import org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker; +import org.opendaylight.controller.sal.dom.broker.impl.SchemaContextProvider; import org.opendaylight.controller.sal.dom.broker.spi.NotificationRouter; -import org.opendaylight.controller.sal.dom.broker.spi.RpcRouter; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.InstanceIdentifierBuilder; import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.model.api.SchemaContext; -public class MountPointImpl implements MountProvisionInstance { +public class MountPointImpl implements MountProvisionInstance, SchemaContextProvider { - private final RpcRouter rpcs; + private final SchemaAwareRpcBroker rpcs; private final DataBrokerImpl dataReader; private final NotificationRouter notificationRouter; private final DataReader readWrapper; @@ -47,7 +54,7 @@ public class MountPointImpl implements MountProvisionInstance { public MountPointImpl(InstanceIdentifier path) { this.mountPath = path; - rpcs = new RpcRouterImpl(""); + rpcs = new SchemaAwareRpcBroker(path.toString(),this); dataReader = new DataBrokerImpl(); notificationRouter = new NotificationRouterImpl(); readWrapper = new ReadWrapper(); @@ -118,7 +125,6 @@ public class MountPointImpl implements MountProvisionInstance { @Override public Future> rpc(QName type, CompositeNode input) { - // TODO Auto-generated method stub return null; } @@ -207,4 +213,10 @@ public class MountPointImpl implements MountProvisionInstance { RegistrationListener> commitHandlerListener) { return dataReader.registerCommitHandlerListener(commitHandlerListener); } + + @Override + public > ListenerRegistration registerRouteChangeListener( + L listener) { + return rpcs.registerRouteChangeListener(listener); + } }