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 org.opendaylight.protocol.bgp.parser.BGPSessionListener;
11 import org.opendaylight.protocol.concepts.ListenerRegistration;
12 import org.opendaylight.protocol.framework.ReconnectStrategy;
13 import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
16 * BGP interface. At this time it only supports listening to changes seen by the backing device, typically a network
17 * element. Abstracts away connection issues - listener starts getting notifications once connection is established.
18 * Implementation of this interface is required to send all previous messages.
20 public interface BGP {
22 * Register for BGP update feed. Specified listener will have the BGP information synchronized. The registration
23 * needs to be explicitly closed in order to stop receiving the updates.
25 * @param listener {@link BGPSessionListener}
26 * @param tcpStrategyFactory {@link ReconnectStrategyFactory} to use for creating TCP-level retry strategies
27 * @param sessionStrategy {@link ReconnectStrategy} to use for session-level retries
28 * @throws IllegalStateException if there is already a listener registered
29 * @return ListenerRegistration
31 ListenerRegistration<BGPSessionListener> registerUpdateListener(BGPSessionListener listener,
32 ReconnectStrategyFactory tcpStrategyFactory, ReconnectStrategy sessionStrategy);