2 * Copyright © 2017 AT&T, Inc. 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
8 package org.opendaylight.transportpce.pce.impl;
10 import org.opendaylight.mdsal.binding.api.RpcProviderService;
11 import org.opendaylight.transportpce.pce.service.PathComputationService;
12 import org.opendaylight.yangtools.concepts.Registration;
13 import org.osgi.service.component.annotations.Activate;
14 import org.osgi.service.component.annotations.Component;
15 import org.osgi.service.component.annotations.Deactivate;
16 import org.osgi.service.component.annotations.Reference;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 * PceService implementation.
23 @Component(immediate = true)
24 public class PceServiceRPCImpl {
25 private static final Logger LOG = LoggerFactory.getLogger(PceServiceRPCImpl.class);
26 private Registration reg;
29 public PceServiceRPCImpl(@Reference RpcProviderService rpcProviderService,
30 @Reference PathComputationService pathComputationService) {
31 this.reg = rpcProviderService.registerRpcImplementations(
32 new CancelResourceReserveImpl(pathComputationService),
33 new PathComputationRequestImpl(pathComputationService),
34 new PathComputationRerouteRequestImpl(pathComputationService));
35 LOG.info("PceServiceRPCImpl instantiated");
41 LOG.info("PceServiceRPCImpl Closed");
44 public Registration getRegisteredRpc() {