Merge "Bug 3328: Set icmpv4-match into OF10 match."
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / services / OpendaylightQueueStatisticsServiceImpl.java
1 /**
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowplugin.impl.statistics.services;
9
10 import java.util.concurrent.Future;
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
12 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsInput;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromAllPortsOutput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetAllQueuesStatisticsFromGivenPortOutput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortInput;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortOutput;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
20 import org.opendaylight.yangtools.yang.common.RpcResult;
21
22 public class OpendaylightQueueStatisticsServiceImpl implements OpendaylightQueueStatisticsService {
23     private final AllQueuesAllPortsService allQueuesAllPorts;
24     private final AllQueuesOnePortService allQueuesOnePort;
25     private final OneQueueOnePortService oneQueueOnePort;
26
27     public OpendaylightQueueStatisticsServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext) {
28         allQueuesAllPorts = new AllQueuesAllPortsService(requestContextStack, deviceContext);
29         allQueuesOnePort = new AllQueuesOnePortService(requestContextStack, deviceContext);
30         oneQueueOnePort = new OneQueueOnePortService(requestContextStack, deviceContext);
31     }
32
33     @Override
34     public Future<RpcResult<GetAllQueuesStatisticsFromAllPortsOutput>> getAllQueuesStatisticsFromAllPorts(
35             final GetAllQueuesStatisticsFromAllPortsInput input) {
36         return allQueuesAllPorts.handleServiceCall(input);
37     }
38
39     @Override
40     public Future<RpcResult<GetAllQueuesStatisticsFromGivenPortOutput>> getAllQueuesStatisticsFromGivenPort(
41             final GetAllQueuesStatisticsFromGivenPortInput input) {
42         return allQueuesOnePort.handleServiceCall(input);
43     }
44
45     @Override
46     public Future<RpcResult<GetQueueStatisticsFromGivenPortOutput>> getQueueStatisticsFromGivenPort(
47             final GetQueueStatisticsFromGivenPortInput input) {
48         return oneQueueOnePort.handleServiceCall(input);
49     }
50 }