X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FHeliumNotificationServiceAdapter.java;fp=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FHeliumNotificationServiceAdapter.java;h=68daa45c45c88c8b9d410c37f5512d7439c9e0c3;hb=0dcdc14a4ff38b39fed0d07658941a09a4c043fd;hp=0000000000000000000000000000000000000000;hpb=b55b98c40f0dd78c192ab872aea283832460a335;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationServiceAdapter.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationServiceAdapter.java new file mode 100644 index 0000000000..68daa45c45 --- /dev/null +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationServiceAdapter.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.md.sal.binding.compat; + +import org.opendaylight.controller.md.sal.binding.api.NotificationService; +import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.yang.binding.Notification; +import org.opendaylight.yangtools.yang.binding.NotificationListener; + +public class HeliumNotificationServiceAdapter implements org.opendaylight.controller.sal.binding.api.NotificationService, AutoCloseable { + + private final NotificationService notificationService; + + public HeliumNotificationServiceAdapter(NotificationService notificationService) { + this.notificationService = notificationService; + } + + @Override + public ListenerRegistration> registerNotificationListener( + final Class notificationType, final org.opendaylight.controller.sal.binding.api.NotificationListener listener) { + throw new UnsupportedOperationException("Not supported type of listener."); + } + + @Override + public ListenerRegistration registerNotificationListener( + final NotificationListener listener) { + return notificationService.registerNotificationListener(listener); + } + + @Override + public void close() throws Exception { + + } +}