stress test related improvement
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / OpenflowPluginProvider.java
index 2737326a3b8af2fd1159b71c96f1f2d1487573d2..a7a3ca13dde9ad83a5eccb2d98b40f605dc38608 100644 (file)
@@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext;
 /**
  * OFPlugin provider implementation
  */
-public class OpenflowPluginProvider implements BindingAwareProvider {
+public class OpenflowPluginProvider implements BindingAwareProvider, AutoCloseable {
 
     private BindingAwareBroker broker;
 
@@ -74,6 +74,11 @@ public class OpenflowPluginProvider implements BindingAwareProvider {
         messageCountCommandProvider = new MessageCountCommandProvider(context, messageCountProvider);
         messageCountCommandProvider.onSessionInitiated(session);
     }
+    
+    @Override
+    public void close() {
+        mdController.stop();
+    }
 
     @Override
     public void onSessionInitialized(ConsumerContext session) {