Switch KitchenServiceImpl to CompositeListener
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / NotificationListenerBean.java
index c0931f32c2f0198beade03d2101cac3ca77c828a..55be59cea31a387bde54192fb51c2e3207ab284b 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.blueprint.ext;
 
-import org.opendaylight.controller.md.sal.binding.api.NotificationService;
+import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.NotificationListener;
 import org.osgi.framework.Bundle;
@@ -24,19 +24,20 @@ public class NotificationListenerBean {
     private static final Logger LOG = LoggerFactory.getLogger(NotificationListenerBean.class);
     static final String NOTIFICATION_LISTENER = "notification-listener";
 
-    private Bundle bundle;
-    private NotificationService notificationService;
-    private NotificationListener notificationListener;
-    private ListenerRegistration<?> registration;
+    private Bundle bundle = null;
+    private NotificationService notificationService = null;
+    private NotificationListener notificationListener = null;
+    private ListenerRegistration<?> registration = null;
 
-    public void setNotificationService(NotificationService notificationService) {
+    public void setNotificationService(final NotificationService notificationService) {
         this.notificationService = notificationService;
     }
-    public void setNotificationListener(NotificationListener notificationListener) {
+
+    public void setNotificationListener(final NotificationListener notificationListener) {
         this.notificationListener = notificationListener;
     }
 
-    public void setBundle(Bundle bundle) {
+    public void setBundle(final Bundle bundle) {
         this.bundle = bundle;
     }
 
@@ -47,7 +48,7 @@ public class NotificationListenerBean {
     }
 
     public void destroy() {
-        if(registration != null) {
+        if (registration != null) {
             LOG.debug("{}: destroy - closing ListenerRegistration {}", bundle.getSymbolicName(), notificationListener);
             registration.close();
         } else {