Enhance StatisticService to allow filtering by Application ID and Group ID

Resolve ONOS-205

Change-Id: Ie9318a5ade943bd8e47fb92ee856b7ebead5022e
diff --git a/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java b/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java
index cc97474..de59886 100644
--- a/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java
+++ b/core/api/src/main/java/org/onlab/onos/net/statistic/StatisticService.java
@@ -15,11 +15,15 @@
  */
 package org.onlab.onos.net.statistic;
 
+import org.onlab.onos.core.ApplicationId;
+import org.onlab.onos.core.GroupId;
 import org.onlab.onos.net.ConnectPoint;
 import org.onlab.onos.net.Link;
 import org.onlab.onos.net.Path;
 import org.onlab.onos.net.flow.FlowRule;
 
+import java.util.Optional;
+
 /**
  * Service for obtaining statistic information about link in the system.
  * Statistics are obtained from the FlowRuleService in order to minimize the
@@ -68,4 +72,14 @@
      */
     FlowRule highestHitter(ConnectPoint connectPoint);
 
+    /**
+     * Obtain the load for a the ingress to the given link used by
+     * the specified application ID and group ID.
+     *
+     * @param link    link to query
+     * @param appId   application ID to filter with
+     * @param groupId group ID to filter with
+     * @return {@link Load Load}
+     */
+    Load load(Link link, ApplicationId appId, Optional<GroupId> groupId);
 }