2 * Copyright (c) 2014 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
9 package org.opendaylight.protocol.bgp.rib.impl;
11 import io.netty.channel.Channel;
12 import io.netty.util.concurrent.Promise;
13 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry;
14 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionPreferences;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.Open;
19 * Server negotiator. Validates established connections using BGPServerSessionValidator
21 public final class BGPServerSessionNegotiator extends AbstractBGPSessionNegotiator {
23 public BGPServerSessionNegotiator(final Promise<BGPSessionImpl> promise, final Channel channel,
24 final BGPPeerRegistry registry) {
25 super(promise, channel, registry);
29 protected Ipv4Address getSourceId(final Open openMsg, final BGPSessionPreferences preferences) {
30 return preferences.getBgpId();
34 protected Ipv4Address getDestinationId(final Open openMsg, final BGPSessionPreferences preferences) {
35 return openMsg.getBgpIdentifier();