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%2Fosgi%2FProxyFactory.xtend;h=d0afc3f47dbb325b2e9b95fb715b3f8a611a82d9;hp=3f77133c2e3a2937fac78254b7f858b0ddadf42f;hb=26da3c2a206a753356b507b018052cbb9cccca7d;hpb=bf8cca4f590ce0a8bece21f0f1a81f6823ee3d65 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.xtend b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.xtend index 3f77133c2e..d0afc3f47d 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.xtend +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.xtend @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 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.osgi import org.opendaylight.controller.sal.core.api.BrokerService @@ -9,6 +16,7 @@ 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 class ProxyFactory { @@ -16,6 +24,7 @@ class ProxyFactory { return createProxyImpl(serviceRef, service) as T; } + private static def dispatch createProxyImpl(ServiceReference ref, DataBrokerService service) { new DataBrokerServiceProxy(ref as ServiceReference, service); } @@ -44,6 +53,11 @@ class ProxyFactory { private static def dispatch createProxyImpl(ServiceReference ref, RpcProvisionRegistry service) { new RpcProvisionRegistryProxy(ref as ServiceReference, service); } + + private static def dispatch createProxyImpl(ServiceReference ref, DOMDataBroker service) { + new DOMDataBrokerProxy(ref as ServiceReference, service) + } + private static def dispatch createProxyImpl(ServiceReference reference, BrokerService service) { throw new IllegalArgumentException("Not supported class");