X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMNotificationService.java;h=3edde3c8cd721dc7b9c0c2c76ece498f17f67aab;hb=42d81f7049dd51da1909b0cf503364c931a77dda;hp=6bce9c447add70d54e85168045a0e10ee3a24bab;hpb=be4649e2eb2eb48970107d50e0da9e54428dd846;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationService.java index 6bce9c447a..3edde3c8cd 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationService.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationService.java @@ -9,13 +9,14 @@ package org.opendaylight.controller.md.sal.dom.api; import java.util.Collection; import javax.annotation.Nonnull; +import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.model.api.SchemaPath; /** * A {@link DOMService} which allows its users to subscribe to receive * {@link DOMNotification}s. */ -public interface DOMNotificationService { +public interface DOMNotificationService extends DOMService { /** * Register a {@link DOMNotificationListener} to receive a set of notifications. As with * other ListenerRegistration-based interfaces, registering an instance multiple times @@ -24,13 +25,14 @@ public interface DOMNotificationService { * @param listener Notification instance to register * @param types Notification types which should be delivered to the listener. Duplicate * entries are processed only once, null entries are ignored. - * @return Registration handle. Invoking {@link DOMNotificationListenerRegistration#close()} + * @return Registration handle. Invoking {@link ListenerRegistration#close()} * will stop the delivery of notifications to the listener * @throws IllegalArgumentException if types is empty or contains an invalid element, such as * null or a SchemaPath which does not represent a valid {@link DOMNotification} type. * @throws NullPointerException if either of the arguments is null */ - DOMNotificationListenerRegistration registerNotificationListener(@Nonnull DOMNotificationListener listener, @Nonnull Collection types); + ListenerRegistration registerNotificationListener( + @Nonnull T listener, @Nonnull Collection types); /** * Register a {@link DOMNotificationListener} to receive a set of notifications. As with @@ -40,12 +42,13 @@ public interface DOMNotificationService { * @param listener Notification instance to register * @param types Notification types which should be delivered to the listener. Duplicate * entries are processed only once, null entries are ignored. - * @return Registration handle. Invoking {@link DOMNotificationListenerRegistration#close()} + * @return Registration handle. Invoking {@link ListenerRegistration#close()} * will stop the delivery of notifications to the listener * @throws IllegalArgumentException if types is empty or contains an invalid element, such as * null or a SchemaPath which does not represent a valid {@link DOMNotification} type. * @throws NullPointerException if listener is null */ // FIXME: Java 8: provide a default implementation of this method. - DOMNotificationListenerRegistration registerNotificationListener(@Nonnull DOMNotificationListener listener, SchemaPath... types); + ListenerRegistration registerNotificationListener( + @Nonnull T listener, SchemaPath... types); }