Implementation of new Flow Subsystem:

The subsystem no longer returns futures for tracking completion of work.
Notifications are explicitely returned via a call back mechanism. Also, the
subsystem is now asynchronous.

Change-Id: I1a4cef931c24820f9ae9ed9a5398f163f05dfbc9

more flowservice improvements

Change-Id: I5c9c1b6be4b2ebfa523b64f6f52e7634b7d3e05f

more flowservice impl

Change-Id: I05f6774460effb53ced8c36844bcda2f8f6c096f

Manager to store functional (at least i believe it)

Change-Id: I09b04989bd1004c98fe0bafed4c76714b9155d53

flow subsystem functional: need to fix unit tests

Change-Id: I1667f25b91320f625a03e5e1d5e92823184d9de0

flow subsystem functional

Change-Id: I429b3335c16d4fc16f5d55f233dd37c4d1d6111d

finished refactor of flow subsystem

Change-Id: I1899abc6ff6a974a2018d936cc555049c70a6804

fix for null flow provider to use new api

Change-Id: If2fd9bd5baf74d9c61c5c8085cef8bc2d204cbdc
diff --git a/core/api/src/main/java/org/onosproject/net/flow/CompletedBatchOperation.java b/core/api/src/main/java/org/onosproject/net/flow/CompletedBatchOperation.java
index a17f7a3..fce7ee9 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/CompletedBatchOperation.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/CompletedBatchOperation.java
@@ -21,6 +21,7 @@
 
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableSet;
+import org.onosproject.net.DeviceId;
 
 /**
  * Representation of a completed flow rule batch operation.
@@ -30,19 +31,22 @@
     private final boolean success;
     private final Set<FlowRule> failures;
     private final Set<Long> failedIds;
+    private final DeviceId deviceId;
 
     /**
      * Creates a new batch completion result.
      *
-     * @param success  indicates whether the completion is successful.
+     * @param success  indicates whether the completion is successful
      * @param failures set of any failures encountered
      * @param failedIds (optional) set of failed operation ids
+     * @param deviceId the device this operation completed for
      */
     public CompletedBatchOperation(boolean success, Set<? extends FlowRule> failures,
-                                   Set<Long> failedIds) {
+                                   Set<Long> failedIds, DeviceId deviceId) {
         this.success = success;
         this.failures = ImmutableSet.copyOf(failures);
         this.failedIds = ImmutableSet.copyOf(failedIds);
+        this.deviceId = deviceId;
     }
 
     /**
@@ -51,10 +55,12 @@
      * @param success  indicates whether the completion is successful.
      * @param failures set of any failures encountered
      */
-    public CompletedBatchOperation(boolean success, Set<? extends FlowRule> failures) {
+    public CompletedBatchOperation(boolean success, Set<? extends FlowRule> failures,
+                                   DeviceId deviceId) {
         this.success = success;
         this.failures = ImmutableSet.copyOf(failures);
         this.failedIds = Collections.emptySet();
+        this.deviceId = deviceId;
     }
 
 
@@ -73,12 +79,17 @@
         return failedIds;
     }
 
+    public DeviceId deviceId() {
+        return this.deviceId;
+    }
+
     @Override
     public String toString() {
         return MoreObjects.toStringHelper(getClass())
                 .add("success?", success)
                 .add("failedItems", failures)
                 .add("failedIds", failedIds)
+                .add("deviceId", deviceId)
                 .toString();
     }
 }