multimessage collector provides way how to explicitly cancel processing on selected...
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / handlers / MultiMsgCollector.java
index d1f5b2c94bec0a954f53a228dfd42110c44b62d2..a7b82acaf38c5c0260cbf7971827bee200969518 100644 (file)
@@ -8,19 +8,20 @@
 
 package org.opendaylight.openflowplugin.api.openflow.device.handlers;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
 import javax.annotation.Nonnull;
+import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
 
 /**
+ * <p>
  * openflowplugin-api
  * org.opendaylight.openflowplugin.api.openflow.device
- * <p/>
  * Collects multipart msgs from device by provided XID and returns them
  * to the caller as request/collection response one-to-one contract.
  *
  * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
  * @author <a href="mailto:tkubas@cisco.com">Timotej Kubas</a>
- *         <p/>
+ *         </p>
  *         Created: Mar 23, 2015
  */
 public interface MultiMsgCollector {
@@ -31,14 +32,13 @@ public interface MultiMsgCollector {
     final int DEFAULT_TIME_OUT = 10;
 
     /**
-     * Method registers a transaction id xid to the Multipart messages collector
+     * Method registers a requst context to the Multipart messages collector
      * and returns Settable future with all MultipartReply. Method has to be called before
      * send a request to the device, otherwise there is a small possibility to miss a first msg.
      *
-     * @param xid
-     * @return
+     * @param requestContext
      */
-    void registerMultipartXid(long xid);
+    void registerMultipartRequestContext(RequestContext requestContext);
 
     /**
      * Method adds a reply multipart message to the collection and if the message has marker
@@ -49,5 +49,7 @@ public interface MultiMsgCollector {
     void addMultipartMsg(@Nonnull MultipartReply reply);
 
 
-    public void setDeviceReplyProcessor(DeviceReplyProcessor deviceReplyProcessor);
+    void setDeviceReplyProcessor(DeviceReplyProcessor deviceReplyProcessor);
+
+    void invalidateRequestContext(RequestContext requestContext);
 }