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.NotificationService;
13 import org.opendaylight.yangtools.concepts.ListenerRegistration;
14 import org.opendaylight.yangtools.yang.binding.NotificationListener;
15 import org.osgi.service.component.annotations.Activate;
16 import org.osgi.service.component.annotations.Component;
17 import org.osgi.service.component.annotations.Deactivate;
20 @Component(factory = OSGiNotificationService.FACTORY_NAME)
21 public final class OSGiNotificationService extends AbstractAdaptedService<NotificationService>
22 implements NotificationService {
23 // OSGi DS Component Factory name
24 static final String FACTORY_NAME = "org.opendaylight.mdsal.binding.dom.adapter.osgi.OSGiNotificationService";
26 public OSGiNotificationService() {
27 super(NotificationService.class);
31 public <T extends NotificationListener> ListenerRegistration<T> registerNotificationListener(final T listener) {
32 return delegate().registerNotificationListener(listener);
36 void activate(final Map<String, ?> properties) {
41 void deactivate(final int reason) {