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;
13 import org.opendaylight.mdsal.binding.api.RpcProviderService;
14 import org.opendaylight.yangtools.concepts.ObjectRegistration;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16 import org.opendaylight.yangtools.yang.binding.RpcService;
17 import org.osgi.service.component.annotations.Activate;
18 import org.osgi.service.component.annotations.Component;
19 import org.osgi.service.component.annotations.Deactivate;
22 @Component(factory = OSGiRpcProviderService.FACTORY_NAME)
23 public final class OSGiRpcProviderService extends AbstractAdaptedService<RpcProviderService>
24 implements RpcProviderService {
25 // OSGi DS Component Factory name
26 static final String FACTORY_NAME = "org.opendaylight.mdsal.binding.dom.adapter.osgi.OSGiRpcProviderService";
28 public OSGiRpcProviderService() {
29 super(RpcProviderService.class);
33 public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
34 final T implementation) {
35 return delegate().registerRpcImplementation(type, implementation);
39 public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
40 final T implementation, final Set<InstanceIdentifier<?>> paths) {
41 return delegate().registerRpcImplementation(type, implementation, paths);
45 void activate(final Map<String, ?> properties) {