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 org.opendaylight.controller.md.sal.binding.api.NotificationService;
11 import org.opendaylight.yangtools.concepts.ListenerRegistration;
12 import org.opendaylight.yangtools.yang.binding.Notification;
13 import org.opendaylight.yangtools.yang.binding.NotificationListener;
15 public class HeliumNotificationServiceAdapter implements org.opendaylight.controller.sal.binding.api.NotificationService, AutoCloseable {
17 private final NotificationService notificationService;
19 public HeliumNotificationServiceAdapter(NotificationService notificationService) {
20 this.notificationService = notificationService;
24 public <T extends Notification> ListenerRegistration<org.opendaylight.controller.sal.binding.api.NotificationListener<T>> registerNotificationListener(
25 final Class<T> notificationType, final org.opendaylight.controller.sal.binding.api.NotificationListener<T> listener) {
26 throw new UnsupportedOperationException("Not supported type of listener.");
30 public ListenerRegistration<NotificationListener> registerNotificationListener(
31 final NotificationListener listener) {
32 return notificationService.registerNotificationListener(listener);
36 public void close() throws Exception {