X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2Fosgi%2FProxyFactory.java;h=c0eb5d55da5825ab8efb1350c2c6e1b5cd68a0af;hb=43f89a73d733c3c43a875b3724b5a68470894450;hp=c2d6add17a07c8ffefa711618034b690d35040ae;hpb=040d3eee776e73591337781c122f11b81aa02d40;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.java index c2d6add17a..c0eb5d55da 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.java @@ -8,17 +8,17 @@ package org.opendaylight.controller.sal.dom.broker.osgi; import java.util.Arrays; - +import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; +import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService; import org.opendaylight.controller.sal.core.api.BrokerService; -import org.osgi.framework.ServiceReference; +import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry; 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.notify.NotificationPublishService; -import org.opendaylight.controller.sal.core.api.notify.NotificationService; 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.RpcProvisionRegistry; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; +import org.opendaylight.controller.sal.core.api.notify.NotificationPublishService; +import org.opendaylight.controller.sal.core.api.notify.NotificationService; +import org.osgi.framework.ServiceReference; @SuppressWarnings("unchecked") public class ProxyFactory { @@ -31,6 +31,7 @@ public class ProxyFactory { return ((T) _createProxyImpl); } + @Deprecated private static Object _createProxyImpl(final ServiceReference ref, final DataBrokerService service) { @@ -38,6 +39,7 @@ public class ProxyFactory { ((ServiceReference) ref), service); } + @Deprecated private static Object _createProxyImpl(final ServiceReference ref, final DataProviderService service) { @@ -59,6 +61,7 @@ public class ProxyFactory { ((ServiceReference) ref), service); } + @Deprecated private static Object _createProxyImpl(final ServiceReference ref, final MountProvisionService service) { @@ -66,6 +69,13 @@ public class ProxyFactory { ((ServiceReference) ref), service); } + private static Object _createProxyImpl(final ServiceReference ref, + final DOMMountPointService service) { + + return new DOMMountPointServiceProxy( + ((ServiceReference) ref), service); + } + private static Object _createProxyImpl(final ServiceReference ref, final SchemaService service) { @@ -90,8 +100,7 @@ public class ProxyFactory { private static Object _createProxyImpl(final ServiceReference reference, final BrokerService service) { - throw new IllegalArgumentException("Not supported class: " - + service.getClass().getName()); + return service; } private static Object createProxyImpl(final ServiceReference ref, @@ -113,6 +122,8 @@ public class ProxyFactory { return _createProxyImpl(ref, (SchemaService) service); } else if (service instanceof NotificationService) { return _createProxyImpl(ref, (NotificationService) service); + } else if (service instanceof DOMMountPointService) { + return _createProxyImpl(ref, (DOMMountPointService) service); } else if (service != null) { return _createProxyImpl(ref, service); } else {