Search in sources :

Example 1 with NodeConfigServiceImpl

use of org.opendaylight.openflowplugin.impl.services.sal.NodeConfigServiceImpl in project openflowplugin by opendaylight.

the class MdSalRegistrationUtils method registerServices.

/**
 * Method registers all OF services for role {@link OfpRole#BECOMEMASTER}.
 *
 * @param rpcContext    - registration processing is implemented in
 *        {@link org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext}
 *
 * @param deviceContext - every service needs
 *        {@link org.opendaylight.openflowplugin.api.openflow.device.DeviceContext} as input parameter
 *
 * @param convertorExecutor convertor executor
 */
public static void registerServices(@Nonnull final RpcContext rpcContext, @Nonnull final DeviceContext deviceContext, final ExtensionConverterProvider extensionConverterProvider, final ConvertorExecutor convertorExecutor) {
    // TODO: Use multipart writer provider from device context
    final MultipartWriterProvider multipartWriterProvider = MultipartWriterProviderFactory.createDefaultProvider(deviceContext);
    // create service instances
    final SalFlowServiceImpl salFlowService = new SalFlowServiceImpl(rpcContext, deviceContext, convertorExecutor);
    final FlowCapableTransactionServiceImpl flowCapableTransactionService = new FlowCapableTransactionServiceImpl(rpcContext, deviceContext);
    final SalAsyncConfigServiceImpl salAsyncConfigService = new SalAsyncConfigServiceImpl(rpcContext, deviceContext);
    final SalGroupServiceImpl salGroupService = new SalGroupServiceImpl(rpcContext, deviceContext, convertorExecutor);
    final SalMeterServiceImpl salMeterService = new SalMeterServiceImpl(rpcContext, deviceContext, convertorExecutor);
    // register routed service instances
    rpcContext.registerRpcServiceImplementation(SalEchoService.class, new SalEchoServiceImpl(rpcContext, deviceContext));
    rpcContext.registerRpcServiceImplementation(SalFlowService.class, salFlowService);
    rpcContext.registerRpcServiceImplementation(FlowCapableTransactionService.class, flowCapableTransactionService);
    rpcContext.registerRpcServiceImplementation(SalAsyncConfigService.class, salAsyncConfigService);
    rpcContext.registerRpcServiceImplementation(SalMeterService.class, salMeterService);
    rpcContext.registerRpcServiceImplementation(SalGroupService.class, salGroupService);
    rpcContext.registerRpcServiceImplementation(SalTableService.class, new SalTableServiceImpl(rpcContext, deviceContext, convertorExecutor, multipartWriterProvider));
    rpcContext.registerRpcServiceImplementation(SalPortService.class, new SalPortServiceImpl(rpcContext, deviceContext, convertorExecutor));
    rpcContext.registerRpcServiceImplementation(PacketProcessingService.class, new PacketProcessingServiceImpl(rpcContext, deviceContext, convertorExecutor));
    rpcContext.registerRpcServiceImplementation(NodeConfigService.class, new NodeConfigServiceImpl(rpcContext, deviceContext));
    rpcContext.registerRpcServiceImplementation(OpendaylightFlowStatisticsService.class, OpendaylightFlowStatisticsServiceImpl.createWithOook(rpcContext, deviceContext, convertorExecutor));
    // register direct statistics gathering services
    rpcContext.registerRpcServiceImplementation(OpendaylightDirectStatisticsService.class, new OpendaylightDirectStatisticsServiceImpl(deviceContext.canUseSingleLayerSerialization() ? SingleLayerDirectStatisticsProviderInitializer.createProvider(rpcContext, deviceContext, convertorExecutor, multipartWriterProvider) : MultiLayerDirectStatisticsProviderInitializer.createProvider(rpcContext, deviceContext, convertorExecutor, multipartWriterProvider)));
    // register flat batch services
    rpcContext.registerRpcServiceImplementation(SalFlatBatchService.class, new SalFlatBatchServiceImpl(new SalFlowsBatchServiceImpl(salFlowService, flowCapableTransactionService), new SalGroupsBatchServiceImpl(salGroupService, flowCapableTransactionService), new SalMetersBatchServiceImpl(salMeterService, flowCapableTransactionService)));
    // register experimenter services
    rpcContext.registerRpcServiceImplementation(SalExperimenterMessageService.class, new SalExperimenterMessageServiceImpl(rpcContext, deviceContext, extensionConverterProvider));
    rpcContext.registerRpcServiceImplementation(SalExperimenterMpMessageService.class, new SalExperimenterMpMessageServiceImpl(rpcContext, deviceContext, extensionConverterProvider));
    // register onf extension bundles
    rpcContext.registerRpcServiceImplementation(SalBundleService.class, new SalBundleServiceImpl(new SalExperimenterMessageServiceImpl(rpcContext, deviceContext, extensionConverterProvider)));
}
Also used : SalEchoServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalEchoServiceImpl) SalTableServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalTableServiceImpl) SalFlatBatchServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalFlatBatchServiceImpl) SalGroupServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalGroupServiceImpl) SalExperimenterMessageServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalExperimenterMessageServiceImpl) OpendaylightDirectStatisticsServiceImpl(org.opendaylight.openflowplugin.impl.statistics.services.direct.OpendaylightDirectStatisticsServiceImpl) SalExperimenterMpMessageServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalExperimenterMpMessageServiceImpl) SalPortServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalPortServiceImpl) SalAsyncConfigServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalAsyncConfigServiceImpl) MultipartWriterProvider(org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProvider) SalFlowServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalFlowServiceImpl) FlowCapableTransactionServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.FlowCapableTransactionServiceImpl) SalMeterServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalMeterServiceImpl) SalBundleServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalBundleServiceImpl) SalGroupsBatchServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalGroupsBatchServiceImpl) PacketProcessingServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.PacketProcessingServiceImpl) NodeConfigServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.NodeConfigServiceImpl) SalMetersBatchServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalMetersBatchServiceImpl) SalFlowsBatchServiceImpl(org.opendaylight.openflowplugin.impl.services.sal.SalFlowsBatchServiceImpl)

Aggregations

MultipartWriterProvider (org.opendaylight.openflowplugin.impl.datastore.MultipartWriterProvider)1 FlowCapableTransactionServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.FlowCapableTransactionServiceImpl)1 NodeConfigServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.NodeConfigServiceImpl)1 PacketProcessingServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.PacketProcessingServiceImpl)1 SalAsyncConfigServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalAsyncConfigServiceImpl)1 SalBundleServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalBundleServiceImpl)1 SalEchoServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalEchoServiceImpl)1 SalExperimenterMessageServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalExperimenterMessageServiceImpl)1 SalExperimenterMpMessageServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalExperimenterMpMessageServiceImpl)1 SalFlatBatchServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalFlatBatchServiceImpl)1 SalFlowServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalFlowServiceImpl)1 SalFlowsBatchServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalFlowsBatchServiceImpl)1 SalGroupServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalGroupServiceImpl)1 SalGroupsBatchServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalGroupsBatchServiceImpl)1 SalMeterServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalMeterServiceImpl)1 SalMetersBatchServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalMetersBatchServiceImpl)1 SalPortServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalPortServiceImpl)1 SalTableServiceImpl (org.opendaylight.openflowplugin.impl.services.sal.SalTableServiceImpl)1 OpendaylightDirectStatisticsServiceImpl (org.opendaylight.openflowplugin.impl.statistics.services.direct.OpendaylightDirectStatisticsServiceImpl)1