* Creates IpAddress from SocketAddress. Only InetSocketAddress is accepted with inner address: Inet4Address and Inet6Address.
*
* @param socketAddress socket address to transform
+ * @return IpAddress equivalent to given socket address
* @throws IllegalArgumentException if submitted socket address is not InetSocketAddress[ipv4 | ipv6]
*/
public static IpAddress getIpAddress(final SocketAddress socketAddress) {
Future<? extends BGPSession> createClient(InetSocketAddress address, AsNumber remoteAs,
BGPPeerRegistry peerRegistry, ReconnectStrategy strategy);
+ /**
+ * Creates Reconnecting client.
+ *
+ * @param address Peer address
+ * @param remoteAs remote AS
+ * @param peerRegistry BGP peer registry
+ * @param connectStrategyFactory reconnection strategy
+ * @param keys for TCPMD5
+ * @return Future promising a client session
+ */
Future<Void> createReconnectingClient(InetSocketAddress address, AsNumber remoteAs,
BGPPeerRegistry peerRegistry, ReconnectStrategyFactory connectStrategyFactory, KeyMapping keys);
/**
* Create new BGP server to accept incoming bgp connections (bound to provided socket address).
+ *
+ * @param peerRegistry BGP peer registry
+ * @param address Peer address
+ * @param sessionValidator BGPSessionValidator
+ *
+ * @return ChannelFuture promising a client session
*/
ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address, BGPSessionValidator sessionValidator);
}
* @param ip address of remote peer
* @param sourceId BGP ID of peer that initiated the session (current device or remote peer)
* @param remoteId BGP ID of peer that accepted the session (current device or remote peer)
- * @param asNumber id of the AS
- * @return configured Peer as BGP listener
+ * @param asNumber remote AS number
+ * @return BGPSessionListener configured Peer as BGP listener
*
* @throws BGPDocumentedException if session establishment cannot be finished successfully
* @throws java.lang.IllegalStateException if there is no peer configured for provided ip address
*/
public interface BGPServerDispatcher {
+ /**
+ * Create new BGP server to accept incoming bgp connections (bound to provided socket address).
+ *
+ * @param peerRegistry BGP peer registry
+ * @param address server address
+ * @param sessionValidator BGPSessionValidator
+ * @return ChannelFuture promising a server session
+ */
ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address, BGPSessionValidator sessionValidator);
/**
* Create new BGP server to accept incoming bgp connections (bound to provided socket address).
+ *
+ * @param peerRegistry BGP peer registry
+ * @param address server address
+ * @param sessionValidator BGPSessionValidator
+ * @param keys KeyMapping
+ * @return ChannelFuture promising a server session
*/
ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address, BGPSessionValidator sessionValidator, KeyMapping keys);
}
/**
* Returns backing RIB support.
*
- * @return
+ * @return RIBSupport
*/
public abstract RIBSupport getRibSupport();
}