Change EventDispatcher field visibility of AbstractHandler to protected.
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / AbstractHandler.java
index 36969bb9dc23b473a5b1d75e5d1a095325e9a6cc..4d611c832c0a696366bd2b5c0563b45a7891f884 100644 (file)
@@ -9,9 +9,9 @@
  */
 package org.opendaylight.ovsdb.openstack.netvirt;
 
-import org.opendaylight.controller.sal.utils.Status;
-import org.opendaylight.controller.sal.utils.StatusCode;
 import org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher;
+import org.opendaylight.ovsdb.openstack.netvirt.api.Status;
+import org.opendaylight.ovsdb.openstack.netvirt.api.StatusCode;
 
 import com.google.common.base.Preconditions;
 import org.slf4j.Logger;
@@ -25,14 +25,18 @@ import java.net.HttpURLConnection;
  * handlers.
  */
 public abstract class AbstractHandler {
-
-    /**
-     * Logger instance.
-     */
     static final Logger logger = LoggerFactory.getLogger(AbstractHandler.class);
 
+    /*public AbstractHandler() {
+        logger.info(">>>>> init {}", this.getClass());
+    }*/
+
     // The implementation for each of these services is resolved by the OSGi Service Manager
-    private volatile EventDispatcher eventDispatcher;
+    protected volatile EventDispatcher eventDispatcher;
+
+    /*void init() {
+        logger.info(">>>>> init {}", this.getClass());
+    }*/
 
     /**
      * Convert failure status returned by the  manager into
@@ -68,10 +72,11 @@ public abstract class AbstractHandler {
     /**
      * Enqueue the event.
      *
-     * @param event the {@link org.opendaylight.ovsdb.openstack.netvirt.AbstractEvent} event to be handled.
+     * @param abstractEvent the {@link org.opendaylight.ovsdb.openstack.netvirt.AbstractEvent} event to be handled.
      * @see org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher
      */
     protected void enqueueEvent(AbstractEvent abstractEvent) {
+        logger.info("enqueueEvent: evenDispatcher: {} - {}", eventDispatcher, abstractEvent);
         Preconditions.checkNotNull(eventDispatcher);
         eventDispatcher.enqueueEvent(abstractEvent);
     }
@@ -79,7 +84,7 @@ public abstract class AbstractHandler {
     /**
      * Process the event.
      *
-     * @param event the {@link org.opendaylight.ovsdb.openstack.netvirt.AbstractEvent} event to be handled.
+     * @param abstractEvent the {@link org.opendaylight.ovsdb.openstack.netvirt.AbstractEvent} event to be handled.
      * @see org.opendaylight.ovsdb.openstack.netvirt.api.EventDispatcher
      */
     public abstract void processEvent(AbstractEvent abstractEvent);