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
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.spi;
9
10 import io.netty.util.concurrent.Future;
11
12 import java.net.InetSocketAddress;
13
14 import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
15 import org.opendaylight.protocol.bgp.parser.BGPSession;
16 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
17 import org.opendaylight.protocol.framework.ReconnectStrategy;
18 import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
19 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
20
21 /**
22  * Dispatcher class for creating BGP clients.
23  */
24 public interface BGPDispatcher {
25
26         /**
27          * Creates BGP client.
28          *
29          * @param address Peer address
30          * @param preferences connection attributes required for connection
31          * @param listener BGP message listener
32          * @return Future promising a client session
33          */
34         Future<? extends BGPSession> createClient(InetSocketAddress address, BGPSessionPreferences preferences, AsNumber remoteAs,
35                         BGPSessionListener listener, ReconnectStrategy strategy);
36
37         Future<Void> createReconnectingClient(InetSocketAddress address, BGPSessionPreferences preferences, AsNumber remoteAs,
38                         BGPSessionListener listener, ReconnectStrategyFactory connectStrategyFactory, ReconnectStrategyFactory reestablishStrategyFactory);
39
40         Future<Void> createReconnectingClient(InetSocketAddress address, BGPSessionPreferences preferences, AsNumber remoteAs,
41                         BGPSessionListener listener, ReconnectStrategyFactory connectStrategyFactory, ReconnectStrategyFactory reestablishStrategyFactory, KeyMapping keys);
42 }