import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
+import org.opendaylight.openflowplugin.impl.services.ServiceException;
import org.opendaylight.openflowplugin.impl.statistics.services.compatibility.AbstractCompatibleStatService;
import org.opendaylight.openflowplugin.impl.statistics.services.compatibility.GroupStatisticsToNotificationTransformer;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev150304.TransactionId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsOutput;
GROUP_CASE = caseBuilder.build();
}
+ private final ConvertorExecutor convertorExecutor;
- public AllGroupsStatsService(RequestContextStack requestContextStack, DeviceContext deviceContext, AtomicLong compatibilityXidSeed) {
+
+ public AllGroupsStatsService(RequestContextStack requestContextStack, DeviceContext deviceContext, AtomicLong compatibilityXidSeed, ConvertorExecutor convertorExecutor) {
super(requestContextStack, deviceContext, compatibilityXidSeed);
+ this.convertorExecutor = convertorExecutor;
}
@Override
- protected OfHeader buildRequest(final Xid xid, final GetAllGroupStatisticsInput input) {
+ protected OfHeader buildRequest(final Xid xid, final GetAllGroupStatisticsInput input) throws ServiceException {
// Create multipart request header
final MultipartRequestInputBuilder mprInput = RequestInputUtils.createMultipartHeader(
MultipartType.OFPMPGROUP, xid.getValue(), getVersion());
@Override
public GroupStatisticsUpdated transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
- return GroupStatisticsToNotificationTransformer.transformToNotification(result, getDeviceInfo(), emulatedTxId);
+ return GroupStatisticsToNotificationTransformer.transformToNotification(result, getDeviceInfo(), emulatedTxId, convertorExecutor);
}
}