BUG-635: implement MD5 auth option for BGP peers
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / BGPDispatcher.java
index 99a6fb68e03b947a4f3051b14d99a3e716744a5d..320698878ac7010c5c1e1ccb5d6347bfba4b9167 100644 (file)
@@ -9,12 +9,14 @@ package org.opendaylight.protocol.bgp.rib.impl.spi;
 
 import io.netty.util.concurrent.Future;
 
-import java.io.IOException;
 import java.net.InetSocketAddress;
 
+import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
+import org.opendaylight.protocol.bgp.parser.BGPSession;
 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
-import org.opendaylight.protocol.bgp.rib.impl.BGPSessionImpl;
 import org.opendaylight.protocol.framework.ReconnectStrategy;
+import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
 
 /**
  * Dispatcher class for creating BGP clients.
@@ -23,11 +25,18 @@ public interface BGPDispatcher {
 
        /**
         * Creates BGP client.
-        * 
-        * @param connection attributes required for connection
-        * @param parser BGP message parser
-        * @return client session
-        * @throws IOException
+        *
+        * @param address Peer address
+        * @param preferences connection attributes required for connection
+        * @param listener BGP message listener
+        * @return Future promising a client session
         */
-       Future<BGPSessionImpl> createClient(InetSocketAddress address, BGPSessionPreferences preferences, BGPSessionListener listener, final ReconnectStrategy strategy);
+       Future<? extends BGPSession> createClient(InetSocketAddress address, BGPSessionPreferences preferences, AsNumber remoteAs,
+                       BGPSessionListener listener, ReconnectStrategy strategy);
+
+       Future<Void> createReconnectingClient(InetSocketAddress address, BGPSessionPreferences preferences, AsNumber remoteAs,
+                       BGPSessionListener listener, ReconnectStrategyFactory connectStrategyFactory, ReconnectStrategyFactory reestablishStrategyFactory);
+
+       Future<Void> createReconnectingClient(InetSocketAddress address, BGPSessionPreferences preferences, AsNumber remoteAs,
+                       BGPSessionListener listener, ReconnectStrategyFactory connectStrategyFactory, ReconnectStrategyFactory reestablishStrategyFactory, KeyMapping keys);
 }