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.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.TransportpcePceService;
13 import org.opendaylight.yangtools.concepts.ObjectRegistration;
14 import org.osgi.service.component.annotations.Activate;
15 import org.osgi.service.component.annotations.Component;
16 import org.osgi.service.component.annotations.Deactivate;
17 import org.osgi.service.component.annotations.Reference;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
23 * Pce Service & Notification.
26 public class PceProvider {
28 private static final Logger LOG = LoggerFactory.getLogger(PceProvider.class);
30 private final RpcProviderService rpcService;
31 private ObjectRegistration<TransportpcePceService> rpcRegistration;
34 public PceProvider(@Reference RpcProviderService rpcProviderService,
35 @Reference PathComputationService pathComputationService,
36 @Reference TransportpcePceService pceServiceRPCImpl) {
37 this.rpcService = rpcProviderService;
38 rpcRegistration = rpcService.registerRpcImplementation(TransportpcePceService.class, pceServiceRPCImpl);
39 LOG.info("PceProvider Session Initiated");
43 * Method called when the blueprint container is destroyed.
47 LOG.info("PceProvider Closed");
48 rpcRegistration.close();