2 * Copyright © 2017 AT&T and others. All rights reserved.
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
9 package org.opendaylight.transportpce.renderer.rpcs;
11 import org.opendaylight.mdsal.binding.api.RpcProviderService;
12 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService;
13 import org.opendaylight.transportpce.renderer.provisiondevice.OtnDeviceRendererService;
14 import org.opendaylight.yangtools.concepts.Registration;
15 import org.osgi.service.component.annotations.Activate;
16 import org.osgi.service.component.annotations.Component;
17 import org.osgi.service.component.annotations.Deactivate;
18 import org.osgi.service.component.annotations.Reference;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
22 @Component(immediate = true)
23 public class DeviceRendererRPCImpl {
25 private static final Logger LOG = LoggerFactory.getLogger(DeviceRendererRPCImpl.class);
26 private Registration reg;
29 public DeviceRendererRPCImpl(@Reference RpcProviderService rpcProviderService,
30 @Reference DeviceRendererService deviceRenderer,
31 @Reference OtnDeviceRendererService otnDeviceRendererService) {
32 this.reg = rpcProviderService.registerRpcImplementations(
33 new ServicePathImpl(deviceRenderer),
34 new OtnServicePathImpl(otnDeviceRendererService),
35 new RendererRollbackImpl(deviceRenderer),
36 new CreateOtsOmsImpl(deviceRenderer));
37 LOG.debug("RPC of DeviceRendererRPCImpl instantiated");
43 LOG.info("DeviceRendererRPCImpl Closed");
46 public Registration getRegisteredRpc() {