Bug 5540 - Remove ConvertorManager singleton
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / services / direct / AbstractDirectStatisticsService.java
index 9c200a990a90e0277ed149f0fad0ce1eba8ad837..156c34a0cdefab96376ef45eca564ceb75084fb0 100644 (file)
@@ -22,6 +22,7 @@ import org.opendaylight.openflowplugin.api.openflow.device.Xid;
 import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
 import org.opendaylight.openflowplugin.impl.services.AbstractMultipartService;
 import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.StoreStatsGrouping;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
@@ -67,18 +68,25 @@ public abstract class AbstractDirectStatisticsService<I extends StoreStatsGroupi
             };
 
     private final MultipartType multipartType;
+    private final ConvertorExecutor convertorExecutor;
     private final OpenflowVersion ofVersion = OpenflowVersion.get(getVersion());
-
     /**
      * Instantiates a new Abstract direct statistics service.
      *
      * @param multipartType       the multipart type
      * @param requestContextStack the request context stack
      * @param deviceContext       the device context
+     * @param convertorExecutor
      */
-    protected AbstractDirectStatisticsService(MultipartType multipartType, RequestContextStack requestContextStack, DeviceContext deviceContext) {
+    protected AbstractDirectStatisticsService(MultipartType multipartType, RequestContextStack requestContextStack,
+                                              DeviceContext deviceContext, ConvertorExecutor convertorExecutor) {
         super(requestContextStack, deviceContext);
         this.multipartType = multipartType;
+        this.convertorExecutor = convertorExecutor;
+    }
+
+    protected ConvertorExecutor getConvertorExecutor() {
+        return convertorExecutor;
     }
 
     /**