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%2FNotificationService.java;h=8f3e1470e48e6c6a109781081193b3d35fd3f01f;hp=015988e3d951327a519a4474afc5bfe7be48ebfa;hb=f1a918f69b787dd422a09e4e8fd83a1d52a72f83;hpb=356ac60051791b56cd28390356906810c0db6024 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 015988e3d9..8f3e1470e4 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 @@ -23,13 +23,16 @@ import org.opendaylight.yangtools.yang.binding.Notification; * * *
* A generic listener implements the {@link NotificationListener} interface which has one callback method
* onNotification
that is invoked for any notification type the listener is subscribed to.
+ *
*
* A generic listener is subscribed using the {@link #registerNotificationListener(Class, NotificationListener)} * method by which you specify the type of notification to receive. A generic listener may be registered for * multiple notification types via multiple subscriptions. + * *
* Generic listeners allow for a more flexible approach, allowing you to subscribe for just * one type of notification from a YANG model. You could also have a general subscription @@ -39,16 +42,18 @@ import org.opendaylight.yangtools.yang.binding.Notification; * * *
* A dispatch listener implements a YANG-generated module interface {ModuleName}Listener
* which handles all the notifications defined in the YANG model. Each notification type translates to
* a specific method of the form on{NotificationType}
on the generated interface.
* The generated interface also extends the
* {@link org.opendaylight.yangtools.yang.binding.NotificationListener} interface and implementations
- * are registered using {@link #registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)}
- * method.
+ * are registered using
+ * {@link #registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)} method.
*
*
* Lets assume we have following YANG model: * @@ -66,6 +71,7 @@ import org.opendaylight.yangtools.yang.binding.Notification; * } * } * + *
* The generated interface will be: * {@code * public interface ExampleListener extends NotificationListener {