Implementation of Rpc interfaces
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / util / MdSalRegistratorUtils.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.util;
9
10 import org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext;
11 import org.opendaylight.openflowplugin.impl.services.NodeConfigServiceImpl;
12 import org.opendaylight.openflowplugin.impl.services.OpendaylightFlowStatisticsServiceImpl;
13 import org.opendaylight.openflowplugin.impl.services.OpendaylightFlowTableStatisticsServiceImpl;
14 import org.opendaylight.openflowplugin.impl.services.OpendaylightGroupStatisticsServiceImpl;
15 import org.opendaylight.openflowplugin.impl.services.OpendaylightMeterStatisticsServiceImpl;
16 import org.opendaylight.openflowplugin.impl.services.OpendaylightPortStatisticsServiceImpl;
17 import org.opendaylight.openflowplugin.impl.services.OpendaylightQueueStatisticsServiceImpl;
18 import org.opendaylight.openflowplugin.impl.services.PacketProcessingServiceImpl;
19 import org.opendaylight.openflowplugin.impl.services.SalFlowServiceImpl;
20 import org.opendaylight.openflowplugin.impl.services.SalGroupServiceImpl;
21 import org.opendaylight.openflowplugin.impl.services.SalMeterServiceImpl;
22 import org.opendaylight.openflowplugin.impl.services.SalTableServiceImpl;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.OpendaylightFlowTableStatisticsService;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.OpendaylightGroupStatisticsService;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
35
36 /**
37  * @author joe
38  */
39 public class MdSalRegistratorUtils {
40
41     private MdSalRegistratorUtils() {
42         throw new IllegalStateException();
43     }
44
45     public static void registerServices(final RpcContext rpcContext) {
46         rpcContext.registerRpcServiceImplementation(SalFlowService.class, new SalFlowServiceImpl(rpcContext));
47         rpcContext.registerRpcServiceImplementation(SalMeterService.class, new SalMeterServiceImpl(rpcContext));
48         rpcContext.registerRpcServiceImplementation(SalGroupService.class, new SalGroupServiceImpl(rpcContext));
49         rpcContext.registerRpcServiceImplementation(SalTableService.class, new SalTableServiceImpl(rpcContext));
50         rpcContext.registerRpcServiceImplementation(PacketProcessingService.class, new PacketProcessingServiceImpl(rpcContext));
51         rpcContext.registerRpcServiceImplementation(OpendaylightFlowStatisticsService.class,
52                 new OpendaylightFlowStatisticsServiceImpl(rpcContext));
53         rpcContext.registerRpcServiceImplementation(OpendaylightGroupStatisticsService.class,
54                 new OpendaylightGroupStatisticsServiceImpl(rpcContext));
55         rpcContext.registerRpcServiceImplementation(OpendaylightMeterStatisticsService.class,
56                 new OpendaylightMeterStatisticsServiceImpl(rpcContext));
57         rpcContext.registerRpcServiceImplementation(OpendaylightPortStatisticsService.class,
58                 new OpendaylightPortStatisticsServiceImpl(rpcContext));
59         rpcContext.registerRpcServiceImplementation(NodeConfigService.class, new NodeConfigServiceImpl(rpcContext));
60         rpcContext.registerRpcServiceImplementation(OpendaylightFlowTableStatisticsService.class,
61                 new OpendaylightFlowTableStatisticsServiceImpl(rpcContext));
62         rpcContext.registerRpcServiceImplementation(OpendaylightQueueStatisticsService.class,
63                 new OpendaylightQueueStatisticsServiceImpl(rpcContext));
64     }
65 }