X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2FOpendaylightGroupStatisticsServiceImpl.java;h=1f56925a9a8f1106f6891a5ff33c5e0212a472cb;hb=73776c548ab153dee35ca4165ca0ef2413969704;hp=674063b5e01427193fb4d7bf76dc37c3e5c787c9;hpb=6c52fa23e21997ac76636b65ec492156b0832360;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImpl.java index 674063b5e0..1f56925a9a 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightGroupStatisticsServiceImpl.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,9 +7,12 @@ */ package org.opendaylight.openflowplugin.impl.statistics.services; -import java.util.concurrent.Future; +import com.google.common.util.concurrent.ListenableFuture; +import java.util.concurrent.atomic.AtomicLong; +import org.opendaylight.mdsal.binding.api.NotificationPublishService; import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack; +import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetAllGroupStatisticsOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GetGroupDescriptionInput; @@ -21,39 +24,49 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111. import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.OpendaylightGroupStatisticsService; import org.opendaylight.yangtools.yang.common.RpcResult; -/** - * @author joe - */ public class OpendaylightGroupStatisticsServiceImpl implements OpendaylightGroupStatisticsService { private final AllGroupsStatsService allGroups; private final GroupDescriptionService groupDesc; private final GroupFeaturesService groupFeat; private final GroupStatsService groupStats; + private final NotificationPublishService notificationPublishService; - public OpendaylightGroupStatisticsServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext) { - allGroups = new AllGroupsStatsService(requestContextStack, deviceContext); - groupDesc = new GroupDescriptionService(requestContextStack, deviceContext); - groupFeat = new GroupFeaturesService(requestContextStack, deviceContext); - groupStats = new GroupStatsService(requestContextStack, deviceContext); + public OpendaylightGroupStatisticsServiceImpl(final RequestContextStack requestContextStack, + final DeviceContext deviceContext, + final AtomicLong compatibilityXidSeed, + final NotificationPublishService notificationPublishService, + final ConvertorExecutor convertorExecutor) { + this.notificationPublishService = notificationPublishService; + allGroups = + new AllGroupsStatsService(requestContextStack, deviceContext, compatibilityXidSeed, convertorExecutor); + groupDesc = new GroupDescriptionService(requestContextStack, + deviceContext, + compatibilityXidSeed, + convertorExecutor); + groupFeat = new GroupFeaturesService(requestContextStack, deviceContext, compatibilityXidSeed); + groupStats = new GroupStatsService(requestContextStack, deviceContext, compatibilityXidSeed, convertorExecutor); } @Override - public Future> getAllGroupStatistics(final GetAllGroupStatisticsInput input) { - return allGroups.handleServiceCall(input); + public ListenableFuture> getAllGroupStatistics( + final GetAllGroupStatisticsInput input) { + return allGroups.handleAndNotify(input, notificationPublishService); } @Override - public Future> getGroupDescription(final GetGroupDescriptionInput input) { - return groupDesc.handleServiceCall(input); + public ListenableFuture> getGroupDescription( + final GetGroupDescriptionInput input) { + return groupDesc.handleAndNotify(input, notificationPublishService); } @Override - public Future> getGroupFeatures(final GetGroupFeaturesInput input) { - return groupFeat.handleServiceCall(input); + public ListenableFuture> getGroupFeatures(final GetGroupFeaturesInput input) { + return groupFeat.handleAndNotify(input, notificationPublishService); } @Override - public Future> getGroupStatistics(final GetGroupStatisticsInput input) { - return groupStats.handleServiceCall(input); + public ListenableFuture> getGroupStatistics( + final GetGroupStatisticsInput input) { + return groupStats.handleAndNotify(input, notificationPublishService); } }