X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openstack%2Fnet-virt%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Fopenstack%2Fnetvirt%2FAbstractHandler.java;h=4d611c832c0a696366bd2b5c0563b45a7891f884;hb=1e1e276653ec1e0ffbd47bcaca31b4f72353923c;hp=36969bb9dc23b473a5b1d75e5d1a095325e9a6cc;hpb=ffb336975be25f06abbb291628916bbcda21818b;p=netvirt.git diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractHandler.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractHandler.java index 36969bb9dc..4d611c832c 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractHandler.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractHandler.java @@ -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);