Bump upstreams
[bgpcep.git] / pcep / tunnel / tunnel-provider / src / main / java / org / opendaylight / bgpcep / pcep / tunnel / provider / TunnelProviderDependencies.java
1 /*
2  * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.bgpcep.pcep.tunnel.provider;
9
10 import static java.util.Objects.requireNonNull;
11
12 import org.opendaylight.mdsal.binding.api.DataBroker;
13 import org.opendaylight.mdsal.binding.api.RpcProviderService;
14 import org.opendaylight.mdsal.binding.api.RpcService;
15 import org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider;
16 import org.osgi.framework.BundleContext;
17
18 final class TunnelProviderDependencies {
19     private final DataBroker dataBroker;
20     private final ClusterSingletonServiceProvider cssp;
21     private final RpcService rpcService;
22     private final RpcProviderService rpcProviderRegistry;
23     private final BundleContext bundleContext;
24
25     TunnelProviderDependencies(
26             final DataBroker dataBroker,
27             final ClusterSingletonServiceProvider cssp,
28             final RpcProviderService rpcProviderRegistry,
29             final RpcService rpcService,
30             final BundleContext bundleContext
31     ) {
32
33         this.dataBroker = requireNonNull(dataBroker);
34         this.cssp = requireNonNull(cssp);
35         this.rpcProviderRegistry = requireNonNull(rpcProviderRegistry);
36         this.bundleContext = requireNonNull(bundleContext);
37         this.rpcService = requireNonNull(rpcService);
38     }
39
40     DataBroker getDataBroker() {
41         return dataBroker;
42     }
43
44     ClusterSingletonServiceProvider getCssp() {
45         return cssp;
46     }
47
48     RpcService getRpcConsumerRegistry() {
49         return rpcService;
50     }
51
52     RpcProviderService getRpcProviderRegistry() {
53         return rpcProviderRegistry;
54     }
55
56     BundleContext getBundleContext() {
57         return bundleContext;
58     }
59 }