Merge "Bug 1072 -Add OF13 pre-req for PCP match in TestCommandProvider"
[openflowplugin.git] / drop-test / src / main / java / org / opendaylight / openflowplugin / droptest / DropTestRpcProvider.java
index 283f9c15d52bcc1f16e00bb0411bc456b2987872..587505a8a8ad0da428f0638915f6ec5befbac897 100644 (file)
@@ -40,11 +40,26 @@ public class DropTestRpcProvider implements AutoCloseable {
     }
 
     public void start() {
-        this.commiter = new DropTestRpcSender(this, this.getFlowService());;
+        this.commiter = new DropTestRpcSender(this.getFlowService());
         this.listenerRegistration = this.getNotificationService().registerNotificationListener(this.commiter);
         LOG.debug("DropTestProvider Started.");
     }
 
+    public DropTestStats getStats() {
+        if(this.commiter != null) {
+            return this.commiter.getStats();
+        } else {
+            return new DropTestStats("Not initialized yet.");
+        }
+    }
+
+    public void clearStats() {
+        if(this.commiter != null) {
+            this.commiter.clearStats();
+        }
+    }
+
+    @Override
     public void close() {
         try {
             LOG.debug("DropTestProvider stopped.");