mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Added helper method for creating tcp transports from a list of host:port
This commit is contained in:
@ -97,5 +97,19 @@ class ArtemisTcpTransport {
|
||||
}
|
||||
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