X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2FGroupStatsService.java;h=14f1e5ba5f422915cb74c6a5fa3a378fdc541b29;hb=28f2bced3075329036dff49feaa771c8f7e24a9e;hp=e8defee795f1a05e56677b51cf71a1b417a35d6d;hpb=dc32b3883e31861ef2dde36735641e03c3207fb5;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/GroupStatsService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/GroupStatsService.java index e8defee795..14f1e5ba5f 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/GroupStatsService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/GroupStatsService.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the @@ -7,23 +7,40 @@ */ package org.opendaylight.openflowplugin.impl.statistics.services; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; 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.AbstractSimpleService; -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.group.statistics.rev131111.GetGroupStatisticsOutputBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupStatisticsUpdated; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupId; 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; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; 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 AbstractSimpleService { - GroupStatsService(final RequestContextStack requestContextStack, final DeviceContext deviceContext) { - super(requestContextStack, deviceContext, GetGroupStatisticsOutput.class); +final class GroupStatsService extends AbstractCompatibleStatService { + + private final ConvertorExecutor convertorExecutor; + + GroupStatsService(RequestContextStack requestContextStack, + DeviceContext deviceContext, + AtomicLong compatibilityXidSeed, + ConvertorExecutor convertorExecutor) { + super(requestContextStack, deviceContext, compatibilityXidSeed); + this.convertorExecutor = convertorExecutor; } @Override @@ -39,4 +56,17 @@ final class GroupStatsService extends AbstractSimpleService result, TransactionId emulatedTxId) { + return GroupStatisticsToNotificationTransformer.transformToNotification(result, + getDeviceInfo(), + emulatedTxId, + convertorExecutor); + } }