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 java.util.Optional;
13 import org.opendaylight.mdsal.binding.api.MountPoint;
14 import org.opendaylight.mdsal.binding.api.MountPointService;
15 import org.opendaylight.yangtools.concepts.Registration;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
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 = OSGiMountPointService.FACTORY_NAME)
23 public final class OSGiMountPointService extends AbstractAdaptedService<MountPointService>
24 implements MountPointService {
25 // OSGi DS Component Factory name
26 static final String FACTORY_NAME = "org.opendaylight.mdsal.binding.dom.adapter.osgi.OSGiMountPointService";
28 public OSGiMountPointService() {
29 super(MountPointService.class);
33 public Optional<MountPoint> getMountPoint(final InstanceIdentifier<?> mountPoint) {
34 return delegate().getMountPoint(mountPoint);
38 public Registration registerListener(final InstanceIdentifier<?> path, final MountPointListener listener) {
39 return delegate().registerListener(path, listener);
43 void activate(final Map<String, ?> properties) {
48 void deactivate(final int reason) {