Remove unused routedRpcRegistration
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / services / direct / singlelayer / SingleLayerDirectStatisticsProviderInitializer.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.openflowplugin.impl.statistics.services.direct.singlelayer;
10
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
12 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
13 import org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProvider;
14 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractFlowDirectStatisticsService;
15 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractGroupDirectStatisticsService;
16 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractMeterDirectStatisticsService;
17 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractPortDirectStatisticsService;
18 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractQueueDirectStatisticsService;
19 import org.opendaylight.openflowplugin.impl.statistics.services.direct.OpendaylightDirectStatisticsServiceProvider;
20 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
21
22 /**
23  * Utility class for instantiating
24  * #{@link org.opendaylight.openflowplugin.impl.statistics.services.direct.OpendaylightDirectStatisticsServiceProvider}
25  * with all multi-layer services already in.
26  */
27 public final class SingleLayerDirectStatisticsProviderInitializer {
28
29     private SingleLayerDirectStatisticsProviderInitializer() {
30     }
31
32     public static OpendaylightDirectStatisticsServiceProvider createProvider(
33         final RequestContextStack requestContextStack,
34         final DeviceContext deviceContext,
35         final ConvertorExecutor convertorExecutor,
36         final MultipartWriterProvider statisticsWriterProvider) {
37
38         final OpendaylightDirectStatisticsServiceProvider provider = new OpendaylightDirectStatisticsServiceProvider();
39
40         provider.register(AbstractFlowDirectStatisticsService.class, new FlowDirectStatisticsService(
41             requestContextStack, deviceContext, convertorExecutor, statisticsWriterProvider));
42         provider.register(AbstractGroupDirectStatisticsService.class, new GroupDirectStatisticsService(
43             requestContextStack, deviceContext, convertorExecutor, statisticsWriterProvider));
44         provider.register(AbstractMeterDirectStatisticsService.class, new MeterDirectStatisticsService(
45             requestContextStack, deviceContext, convertorExecutor, statisticsWriterProvider));
46         provider.register(AbstractPortDirectStatisticsService.class, new PortDirectStatisticsService(
47             requestContextStack, deviceContext, convertorExecutor, statisticsWriterProvider));
48         provider.register(AbstractQueueDirectStatisticsService.class, new QueueDirectStatisticsService(
49             requestContextStack, deviceContext, convertorExecutor, statisticsWriterProvider));
50
51         return provider;
52     }
53
54 }