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.spi;
10 import java.util.List;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.open.message.BgpParameters;
16 * DTO for BGP Session preferences, that contains BGP Open message.
18 public final class BGPSessionPreferences {
20 private final AsNumber as;
22 private final int hold;
24 private final Ipv4Address bgpId;
26 private final List<BgpParameters> params;
28 private final AsNumber remoteAs;
31 * Creates a new DTO for Open message.
33 * @param as local AS number
34 * @param hold preferred hold timer value, in seconds
35 * @param bgpId local BGP Identifier
36 * @param remoteAs expected remote As Number
37 * @param params list of advertised parameters
39 public BGPSessionPreferences(final AsNumber as, final int hold, final Ipv4Address bgpId, final AsNumber remoteAs,
40 final List<BgpParameters> params) {
44 this.remoteAs = remoteAs;
49 * Returns my AS number.
53 public AsNumber getMyAs() {
58 * Returns initial value of HoldTimer.
60 * @return initial value of HoldTimer
62 public int getHoldTime() {
67 * Returns my BGP Identifier.
69 * @return BGP identifier
71 public Ipv4Address getBgpId() {
76 * Returns expected remote AS number.
80 public AsNumber getExpectedRemoteAs() {
85 * Gets a list of advertised bgp parameters.
87 * @return a list of advertised bgp parameters
89 public List<BgpParameters> getParams() {