X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2FNotificationListener.java;h=be8e0cefc1a3115329ed3391d99bbc8a38810dcd;hp=b3309b7a12b5af7bc15c310bc06c367d51a7772b;hb=c1362c86eb19e92e6c64d10099a45deb499c6db1;hpb=a251833f27fd00040904e2df316cd707c8129d1e diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java index b3309b7a12..be8e0cefc1 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java @@ -11,7 +11,21 @@ import java.util.EventListener; import org.opendaylight.yangtools.yang.binding.Notification; +/** + * Interface for a generic listener that is interested in receiving YANG modeled notifications. + * This interface acts as a base interface for specific listeners which usually are a type + * capture of this interface. + * + * @param the interested notification type + */ public interface NotificationListener extends EventListener { - + /** + * Invoked to deliver a notification. + *

+ * Note that this method may be invoked from a shared thread pool, so implementations SHOULD NOT + * perform CPU-intensive operations and MUST NOT invoke any potentially blocking operations. + * + * @param notification the notification. + */ void onNotification(T notification); }