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