-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
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.util.RequestInputUtils;
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.GetGroupStatisticsInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupStatisticsOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestGroupCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.group._case.MultipartRequestGroupBuilder;
-final class GroupStatsService
- extends AbstractCompatibleStatService<GetGroupStatisticsInput, GetGroupStatisticsOutput, GroupStatisticsUpdated> {
+final class GroupStatsService extends AbstractCompatibleStatService<GetGroupStatisticsInput,
+ GetGroupStatisticsOutput,
+ GroupStatisticsUpdated> {
- public GroupStatsService(RequestContextStack requestContextStack, DeviceContext deviceContext, AtomicLong compatibilityXidSeed) {
+ private final ConvertorExecutor convertorExecutor;
+
+ GroupStatsService(RequestContextStack requestContextStack,
+ DeviceContext deviceContext,
+ AtomicLong compatibilityXidSeed,
+ ConvertorExecutor convertorExecutor) {
super(requestContextStack, deviceContext, compatibilityXidSeed);
+ this.convertorExecutor = convertorExecutor;
}
@Override
@Override
public GroupStatisticsUpdated transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
- return GroupStatisticsToNotificationTransformer.transformToNotification(result, getDeviceContext().getDeviceState(), getOfVersion(), emulatedTxId);
+ return GroupStatisticsToNotificationTransformer.transformToNotification(result,
+ getDeviceInfo(),
+ emulatedTxId,
+ convertorExecutor);
}
}