2 * Copyright (c) 2017 AT&T Intellectual Property. 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.bgpcep.pcep.tunnel.provider;
10 import static java.util.Objects.requireNonNull;
12 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
13 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
14 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.NetworkTopologyPcepService;
16 import org.osgi.framework.BundleContext;
18 final class TunnelProviderDependencies {
19 private final DataBroker dataBroker;
20 private final ClusterSingletonServiceProvider cssp;
21 private final NetworkTopologyPcepService ntps;
22 private final RpcProviderRegistry rpcProviderRegistry;
23 private final BundleContext bundleContext;
25 TunnelProviderDependencies(
26 final DataBroker dataBroker,
27 final ClusterSingletonServiceProvider cssp,
28 final RpcProviderRegistry rpcProviderRegistry,
29 final BundleContext bundleContext
32 this.dataBroker = requireNonNull(dataBroker);
33 this.cssp = requireNonNull(cssp);
34 this.rpcProviderRegistry = requireNonNull(rpcProviderRegistry);
35 this.bundleContext = requireNonNull(bundleContext);
36 this.ntps = this.rpcProviderRegistry.getRpcService(NetworkTopologyPcepService.class);
39 DataBroker getDataBroker() {
40 return this.dataBroker;
43 ClusterSingletonServiceProvider getCssp() {
47 NetworkTopologyPcepService getNtps() {
51 RpcProviderRegistry getRpcProviderRegistry() {
52 return this.rpcProviderRegistry;
55 BundleContext getBundleContext() {
56 return this.bundleContext;