Get rid of JSR305 annotations
[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.channel.ChannelFuture;
11 import io.netty.util.concurrent.Future;
12 import java.net.InetSocketAddress;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.eclipse.jdt.annotation.Nullable;
15 import org.opendaylight.protocol.concepts.KeyMapping;
16
17 /**
18  * Dispatcher class for creating BGP clients.
19  */
20 public interface BGPDispatcher {
21     /**
22      * Creates Reconnecting client.
23      *
24      * @param remoteAddress remote Peer Address
25      * @param localAddress  local Peer address
26      * @param retryTimer    Retry timer
27      * @param keys          for TCPMD5
28      * @return Future promising a client session
29      */
30     @NonNull Future<Void> createReconnectingClient(@NonNull InetSocketAddress remoteAddress,
31             @Nullable InetSocketAddress localAddress, int retryTimer, @NonNull KeyMapping keys);
32
33     /**
34      * Create new BGP server to accept incoming bgp connections (bound to provided socket localAddress).
35      *
36      * @param localAddress Peer localAddress
37      * @return ChannelFuture promising a client session
38      */
39     @NonNull ChannelFuture createServer(InetSocketAddress localAddress);
40
41     /**
42      * Return BGP Peer Registry.
43      *
44      * @return BGPPeerRegistry
45      */
46     @NonNull BGPPeerRegistry getBGPPeerRegistry();
47 }