Adjust to RPC method signature update
[bgpcep.git] / pcep / topology / topology-provider / src / main / java / org / opendaylight / bgpcep / pcep / topology / provider / PCEPDispatcherDependenciesImpl.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
9 package org.opendaylight.bgpcep.pcep.topology.provider;
10
11 import static java.util.Objects.requireNonNull;
12
13 import java.net.InetSocketAddress;
14 import javax.annotation.Nonnull;
15 import org.opendaylight.bgpcep.pcep.topology.provider.config.PCEPTopologyConfiguration;
16 import org.opendaylight.protocol.concepts.KeyMapping;
17 import org.opendaylight.protocol.pcep.PCEPDispatcherDependencies;
18 import org.opendaylight.protocol.pcep.PCEPPeerProposal;
19 import org.opendaylight.protocol.pcep.PCEPSessionListenerFactory;
20 import org.opendaylight.protocol.pcep.SpeakerIdMapping;
21
22 public final class PCEPDispatcherDependenciesImpl implements PCEPDispatcherDependencies {
23     private final ServerSessionManager manager;
24     private final PCEPTopologyConfiguration topologyConfigDependencies;
25
26     public PCEPDispatcherDependenciesImpl(
27             @Nonnull final ServerSessionManager manager,
28             @Nonnull final PCEPTopologyConfiguration topologyConfigDependencies
29     ) {
30         this.manager = requireNonNull(manager);
31         this.topologyConfigDependencies = requireNonNull(topologyConfigDependencies);
32     }
33
34     @Override
35     public InetSocketAddress getAddress() {
36         return this.topologyConfigDependencies.getAddress();
37     }
38
39     @Override
40     public KeyMapping getKeys() {
41         return this.topologyConfigDependencies.getKeys();
42     }
43
44     @Override
45     public SpeakerIdMapping getSpeakerIdMapping() {
46         return this.topologyConfigDependencies.getSpeakerIds();
47     }
48
49     @Override
50     public PCEPSessionListenerFactory getListenerFactory() {
51         return this.manager;
52     }
53
54     @Override
55     public PCEPPeerProposal getPeerProposal() {
56         return this.manager;
57     }
58 }