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 io.netty.util.concurrent.Future;
12 import java.net.InetSocketAddress;
14 import org.opendaylight.protocol.bgp.parser.BGPSession;
15 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
16 import org.opendaylight.protocol.framework.ReconnectStrategy;
17 import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
20 * Dispatcher class for creating BGP clients.
22 public interface BGPDispatcher {
27 * @param address Peer address
28 * @param preferences connection attributes required for connection
29 * @param listener BGP message listener
30 * @return Future promising a client session
32 Future<? extends BGPSession> createClient(InetSocketAddress address, BGPSessionPreferences preferences, BGPSessionListener listener,
33 final ReconnectStrategy strategy);
35 Future<Void> createReconnectingClient(InetSocketAddress address, BGPSessionPreferences preferences, BGPSessionListener listener,
36 ReconnectStrategyFactory connectStrategyFactory, final ReconnectStrategy reestablishStrategy);