BUG-956 deadlock by rpc invocation - phase2
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / IMDController.java
index dab563c899198a1582b27219f3c69ea4a646f8a1..40671b047fe6147c8c85b8c3dcae218b6bd0dee2 100644 (file)
@@ -1,20 +1,30 @@
+/**
+ * Copyright IBM Corporation, 2013.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.openflowplugin.openflow.md.core;
 
+import java.util.List;
+
+import org.opendaylight.openflowplugin.openflow.md.queue.PopListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 
 public interface IMDController {
 
     /**
-     * Allows application to start receiving OF messages received from switches.
+     * Allows application to start translating OF messages received from switches.
      *
      * @param messageType
      *            the type of OF message that applications want to receive
      * @param version corresponding OF version
      * @param translator
-     *            : Object that implements the IMDMessageListener
+     *            : Object that implements the {@link IMDMessageTranslator}
      */
-    public void addMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, DataObject> translator);
+    public void addMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, List<DataObject>> translator);
 
     /**
      * Allows application to stop receiving OF message received from switches.
@@ -24,8 +34,28 @@ public interface IMDController {
      *            receiving
      * @param version TODO
      * @param translator
-     *            The object that implements the IMDMessageListener
+     *            The object that implements the {@link IMDMessageTranslator}
+     */
+    public void removeMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, List<DataObject>> translator);
+
+    /**
+     * Allows application to start pop-listening MD-SAL messages received from switches.
+     *
+     * @param messageType
+     *            the type of OF message that applications want to receive
+     * @param popListener
+     *            : Object that implements the {@link PopListener}
+     */
+    void removeMessagePopListener(Class<? extends DataObject> messageType, PopListener<DataObject> popListener);
+
+    /**
+     * Allows application to stop pop-listening MD-SAL messages received from switches.
+     *
+     * @param messageType
+     *            the type of OF message that applications want to receive
+     * @param popListener
+     *            : Object that implements the {@link PopListener}
      */
-    public void removeMessageTranslator(Class<? extends DataObject> messageType, int version, IMDMessageTranslator<OfHeader, DataObject> translator);
+    void addMessagePopListener(Class<? extends DataObject> messageType, PopListener<DataObject> popListener);
 
 }