From: Robert Varga Date: Fri, 11 Apr 2014 08:04:02 +0000 (+0200) Subject: Helium: improve contract with ListenerRegistration X-Git-Tag: release/helium~607^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=3ddb568b492914925b45c53590728d00740d8848 Helium: improve contract with ListenerRegistration Change-Id: Ief4a6a5072824ada4cead4f465961e5a08053f8b Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java index 6e8bda56d8..46e372aea6 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java @@ -7,7 +7,7 @@ */ package org.opendaylight.controller.sal.binding.api; -import org.opendaylight.yangtools.concepts.Registration; +import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.binding.Notification; public interface NotificationService extends BindingAwareService { @@ -16,9 +16,9 @@ public interface NotificationService extends BindingAwareService { * * @param notificationType * @param listener - * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method. + * @return Registration for listener. To unregister listener invoke {@link ListenerRegistration#close()} method. */ - Registration> registerNotificationListener( + ListenerRegistration> registerNotificationListener( Class notificationType, NotificationListener listener); /** @@ -27,8 +27,8 @@ public interface NotificationService extends BindingAwareService { * Listener is registered for all notifications present in implemented interfaces. * * @param listener - * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method. + * @return Registration for listener. To unregister listener invoke {@link ListenerRegistration#close()} method. */ - Registration registerNotificationListener( + ListenerRegistration registerNotificationListener( org.opendaylight.yangtools.yang.binding.NotificationListener listener); } diff --git a/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalConsumerInstance.java b/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalConsumerInstance.java index 7d7e56dae0..53abd39cde 100644 --- a/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalConsumerInstance.java +++ b/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalConsumerInstance.java @@ -14,7 +14,6 @@ import org.opendaylight.controller.sal.binding.api.data.DataBrokerService; import org.opendaylight.controller.sal.binding.api.data.DataChangeListener; import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction; import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.Notification; @@ -72,13 +71,13 @@ public abstract class AbstractBindingSalConsumerInstance Registration> registerNotificationListener( + public ListenerRegistration> registerNotificationListener( Class notificationType, NotificationListener listener) { return getNotificationBrokerChecked().registerNotificationListener(notificationType, listener); } @Override - public Registration registerNotificationListener( + public ListenerRegistration registerNotificationListener( org.opendaylight.yangtools.yang.binding.NotificationListener listener) { return getNotificationBrokerChecked().registerNotificationListener(listener); }