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;
11 import java.util.Optional;
12 import org.opendaylight.mdsal.binding.api.MountPoint;
13 import org.opendaylight.mdsal.binding.api.MountPointService;
14 import org.opendaylight.yangtools.concepts.Registration;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16 import org.osgi.service.component.annotations.Activate;
17 import org.osgi.service.component.annotations.Component;
18 import org.osgi.service.component.annotations.Deactivate;
20 @Component(factory = OSGiMountPointService.FACTORY_NAME)
21 public final class OSGiMountPointService extends AbstractAdaptedService<MountPointService>
22 implements MountPointService {
23 // OSGi DS Component Factory name
24 static final String FACTORY_NAME = "org.opendaylight.mdsal.binding.dom.adapter.osgi.OSGiMountPointService";
27 public OSGiMountPointService(final Map<String, ?> properties) {
28 super(MountPointService.class, properties);
32 void deactivate(final int reason) {
37 public Optional<MountPoint> getMountPoint(final InstanceIdentifier<?> mountPoint) {
38 return delegate.getMountPoint(mountPoint);
42 public Registration registerListener(final InstanceIdentifier<?> path, final MountPointListener listener) {
43 return delegate.registerListener(path, listener);