d68ea1c1ca31041dd041c7f4bf9931dea153c5ca
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / impl / compat / HeliumNotificationServiceAdapter.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.binding.impl.compat;
9
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;
14
15 public class HeliumNotificationServiceAdapter implements org.opendaylight.controller.sal.binding.api.NotificationService, AutoCloseable {
16
17     private final NotificationService notificationService;
18
19     public HeliumNotificationServiceAdapter(NotificationService notificationService) {
20         this.notificationService = notificationService;
21     }
22
23     @Override
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.");
27     }
28
29     @Override
30     public ListenerRegistration<NotificationListener> registerNotificationListener(
31             final NotificationListener listener) {
32         return notificationService.registerNotificationListener(listener);
33     }
34
35     @Override
36     public void close() throws Exception {
37
38     }
39 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.