this.handlerFactory = new BGPHandlerFactory(messageRegistry);
}
- @Override
- public synchronized Future<BGPSessionImpl> createClient(
- final InetSocketAddress remoteAddress,
- final int retryTimer) {
- return createClient(remoteAddress, retryTimer,
- createClientBootStrap(KeyMapping.getKeyMapping(), false));
- }
-
private synchronized Future<BGPSessionImpl> createClient(final InetSocketAddress remoteAddress,
final int retryTimer, final Bootstrap clientBootStrap) {
final BGPClientSessionNegotiatorFactory snf = new BGPClientSessionNegotiatorFactory(this.bgpPeerRegistry);
*/
package org.opendaylight.protocol.bgp.rib.impl.spi;
-import com.google.common.base.Optional;
import io.netty.channel.ChannelFuture;
import io.netty.util.concurrent.Future;
import java.net.InetSocketAddress;
-import org.opendaylight.protocol.bgp.rib.spi.BGPSession;
import org.opendaylight.protocol.concepts.KeyMapping;
/**
* Dispatcher class for creating BGP clients.
*/
-public interface BGPDispatcher{
-
- /**
- * Creates BGP client.
- *
- * @param remoteAddress remote Peer address
- * @param retryTimer Retry timer
- * @return Future promising a client session
- */
- @Deprecated
- Future<? extends BGPSession> createClient(InetSocketAddress remoteAddress, int retryTimer);
-
+public interface BGPDispatcher {
/**
* Creates Reconnecting client.
*
* @param remoteAddress remote Peer Address
- * @param retryTimer Retry timer
- * @param keys for TCPMD5
- * @return Future promising a client session
- */
- @Deprecated
- default Future<Void> createReconnectingClient(InetSocketAddress remoteAddress, int retryTimer, Optional<KeyMapping> keys) {
- if(keys.isPresent()) {
- return createReconnectingClient(remoteAddress, retryTimer, keys.get());
- }
- return createReconnectingClient(remoteAddress, retryTimer, KeyMapping.getKeyMapping());
- }
-
- /**
- * Creates Reconnecting client.
- *
- * @param remoteAddress remote Peer Address
- * @param retryTimer Retry timer
- * @param keys for TCPMD5
+ * @param retryTimer Retry timer
+ * @param keys for TCPMD5
* @return Future promising a client session
*/
Future<Void> createReconnectingClient(InetSocketAddress remoteAddress, int retryTimer, KeyMapping keys);
* Create new BGP server to accept incoming bgp connections (bound to provided socket localAddress).
*
* @param localAddress Peer localAddress
- *
* @return ChannelFuture promising a client session
*/
ChannelFuture createServer(InetSocketAddress localAddress);
/**
* Return BGP Peer Registry
+ *
* @return BGPPeerRegistry
*/
BGPPeerRegistry getBGPPeerRegistry();