2 * Copyright (c) 2013 Cisco Systems, Inc. and others. 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.protocol.bgp.rib.impl;
10 import java.net.InetSocketAddress;
12 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
13 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPConnection;
14 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionPreferences;
15 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionProposalChecker;
19 * Implementation of {@link BGPConnection}.
21 public class BGPConnectionImpl implements BGPConnection {
23 private final InetSocketAddress address;
25 private final BGPSessionListener listener;
27 private final BGPSessionPreferences proposal;
29 private final BGPSessionProposalChecker checker;
32 * Merges together BGP specific connection attributes.
34 * @param address inet socket address
35 * @param listener bgp session listener
36 * @param proposal bgp session preferences
37 * @param checker bgp session proposal checker
39 public BGPConnectionImpl(final InetSocketAddress address, final BGPSessionListener listener, final BGPSessionPreferences proposal,
40 final BGPSessionProposalChecker checker) {
42 this.address = address;
43 this.listener = listener;
44 this.proposal = proposal;
45 this.checker = checker;
49 public InetSocketAddress getPeerAddress() {
54 public BGPSessionListener getListener() {
59 public BGPSessionPreferences getProposal() {
64 public BGPSessionProposalChecker getProposalChecker() {