0cf279d926b4e069fc476c18de72981acc909daa
[bgpcep.git] / pcep / impl / src / main / java / org / opendaylight / protocol / pcep / impl / PCEPConnectionImpl.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  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.protocol.pcep.impl;
9
10 import java.net.InetSocketAddress;
11
12 import org.opendaylight.protocol.pcep.PCEPConnection;
13 import org.opendaylight.protocol.pcep.PCEPSessionListener;
14 import org.opendaylight.protocol.pcep.PCEPSessionPreferences;
15 import org.opendaylight.protocol.pcep.PCEPSessionProposalChecker;
16
17 public class PCEPConnectionImpl implements PCEPConnection {
18
19         private final InetSocketAddress address;
20
21         private final PCEPSessionListener listener;
22
23         private final PCEPSessionPreferences proposal;
24
25         private final PCEPSessionProposalChecker checker;
26
27         public PCEPConnectionImpl(final InetSocketAddress address, final PCEPSessionListener listener, final PCEPSessionPreferences proposal,
28                         final PCEPSessionProposalChecker checker) {
29                 this.address = address;
30                 this.listener = listener;
31                 this.proposal = proposal;
32                 this.checker = checker;
33         }
34
35         @Override
36         public InetSocketAddress getPeerAddress() {
37                 return this.address;
38         }
39
40         @Override
41         public PCEPSessionListener getListener() {
42                 return this.listener;
43         }
44
45         @Override
46         public PCEPSessionPreferences getProposal() {
47                 return this.proposal;
48         }
49
50         @Override
51         public PCEPSessionProposalChecker getProposalChecker() {
52                 return this.checker;
53         }
54 }