Remove ProtocolSessionOutboundHandler
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / BGP.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.bgp.rib.impl;
9
10 import java.io.IOException;
11
12 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
13 import org.opendaylight.protocol.concepts.ListenerRegistration;
14 import org.opendaylight.protocol.framework.ReconnectStrategy;
15
16 /**
17  * BGP interface. At this time it only supports listening to changes seen by the backing device, typically a network
18  * element. Abstracts away connection issues - listener starts getting notifications once connection is established.
19  * Implementation of this interface is required to send all previous messages.
20  */
21 public interface BGP {
22         /**
23          * Register for BGP update feed. Specified listener will have the BGP information synchronized. The registration
24          * needs to be explicitly closed in order to stop receiving the updates.
25          * 
26          * @param listener {@link BGPSessionListener}
27          * @param strategy {@link ReconnectStrategy} to use for TCP-level retries
28          * @throws IllegalStateException if there is already a listener registered
29          * @throws IOException if some IO error occurred
30          * @return ListenerRegistration
31          */
32         public ListenerRegistration<BGPSessionListener> registerUpdateListener(BGPSessionListener listener, ReconnectStrategy strategy) throws IOException;
33 }