mirror of
https://github.com/corda/corda.git
synced 2025-06-15 13:48:14 +00:00
Added helper method for creating tcp transports from a list of host:port
This commit is contained in:
@ -417,7 +417,7 @@ class RPCClientProxyHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun attemptReconnect() {
|
private fun attemptReconnect() {
|
||||||
var reconnectAttempts = rpcConfiguration.maxReconnectAttempts * serverLocator.staticTransportConfigurations.size
|
var reconnectAttempts = rpcConfiguration.maxReconnectAttempts.times(serverLocator.staticTransportConfigurations.size)
|
||||||
var retryInterval = rpcConfiguration.connectionRetryInterval
|
var retryInterval = rpcConfiguration.connectionRetryInterval
|
||||||
val maxRetryInterval = rpcConfiguration.connectionMaxRetryInterval
|
val maxRetryInterval = rpcConfiguration.connectionMaxRetryInterval
|
||||||
|
|
||||||
|
@ -97,5 +97,19 @@ class ArtemisTcpTransport {
|
|||||||
}
|
}
|
||||||
return TransportConfiguration(factoryName, options)
|
return TransportConfiguration(factoryName, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Create as list of [TransportConfiguration]. **/
|
||||||
|
fun tcpTransportsFromList(
|
||||||
|
direction: ConnectionDirection,
|
||||||
|
hostAndPortList: List<NetworkHostAndPort>,
|
||||||
|
config: SSLConfiguration?,
|
||||||
|
enableSSL: Boolean = true): List<TransportConfiguration>{
|
||||||
|
val tcpTransports = ArrayList<TransportConfiguration>(hostAndPortList.size)
|
||||||
|
hostAndPortList.forEach {
|
||||||
|
tcpTransports.add(tcpTransport(direction, it, config, enableSSL))
|
||||||
|
}
|
||||||
|
|
||||||
|
return tcpTransports
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user