2 * Copyright (c) 2015 Cisco Systems, Inc. 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.controller.md.sal.binding.compat;
10 import java.util.concurrent.ExecutorService;
11 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
12 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
13 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.binding.Notification;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
19 @Deprecated(forRemoval = true)
20 public class HeliumNotificationProviderServiceAdapter extends HeliumNotificationServiceAdapter
21 implements NotificationProviderService {
22 private static final Logger LOG = LoggerFactory.getLogger(HeliumNotificationProviderServiceAdapter.class);
24 private final NotificationPublishService notificationPublishService;
26 public HeliumNotificationProviderServiceAdapter(final NotificationPublishService notificationPublishService,
27 final NotificationService notificationService) {
28 super(notificationService);
29 this.notificationPublishService = notificationPublishService;
33 public void publish(final Notification notification) {
35 notificationPublishService.putNotification(notification);
36 } catch (InterruptedException e) {
37 LOG.error("Notification publication was interupted", e);
42 public void publish(final Notification notification, final ExecutorService executor) {
44 notificationPublishService.putNotification(notification);
45 } catch (InterruptedException e) {
46 LOG.error("Notification publication was interupted", e);
51 public ListenerRegistration<NotificationInterestListener> registerInterestListener(
52 final NotificationInterestListener interestListener) {
53 throw new UnsupportedOperationException("InterestListener is not supported.");