public interface Reconnect
Supplier
to provide information
to the TcpClient
whether or not to attempt to reconnect a broken connection.
The reconnect(java.net.InetSocketAddress, int)
method will be invoked, passing the currently-connected
address and the number of times a reconnection has been attempted on this connection. If the client is to reconnect
to a different host, then provide that different address in the return value. If you don't want to try and reconnect
at all, simply return null
.Modifier and Type | Method and Description |
---|---|
Tuple2<InetSocketAddress,Long> |
reconnect(InetSocketAddress currentAddress,
int attempt)
Provide an
InetSocketAddress to which a reconnection attempt should be made. |
Tuple2<InetSocketAddress,Long> reconnect(InetSocketAddress currentAddress, int attempt)
InetSocketAddress
to which a reconnection attempt should be made.currentAddress
- the address to which the client is currently connectedInetSocketAddress
to which a reconnection attempt should be made and a Long
denoting the time to delay a reconnection attemptCopyright © 2017. All rights reserved.