2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.dom.adapter.osgi;
10 import com.google.common.annotations.Beta;
12 import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
13 import org.opendaylight.yangtools.yang.binding.RpcService;
14 import org.osgi.service.component.annotations.Activate;
15 import org.osgi.service.component.annotations.Component;
16 import org.osgi.service.component.annotations.Deactivate;
19 @Component(factory = OSGiRpcConsumerRegistry.FACTORY_NAME)
20 public final class OSGiRpcConsumerRegistry extends AbstractAdaptedService<RpcConsumerRegistry>
21 implements RpcConsumerRegistry {
22 // OSGi DS Component Factory name
23 static final String FACTORY_NAME = "org.opendaylight.mdsal.binding.dom.adapter.osgi.OSGiRpcConsumerRegistry";
25 public OSGiRpcConsumerRegistry() {
26 super(RpcConsumerRegistry.class);
30 public <T extends RpcService> T getRpcService(final Class<T> serviceInterface) {
31 return delegate().getRpcService(serviceInterface);
35 void activate(final Map<String, ?> properties) {
40 void deactivate(final int reason) {