mirror of
https://github.com/corda/corda.git
synced 2025-03-22 12:05:59 +00:00
Minor: add a couple more utilities for converting strings into the type safe endpoint address objects
This commit is contained in:
parent
5aaa6bd204
commit
92a7363c83
@ -12,6 +12,7 @@ import com.google.common.net.HostAndPort
|
||||
import core.RunOnCallerThread
|
||||
import core.ThreadBox
|
||||
import core.messaging.*
|
||||
import core.node.Node
|
||||
import core.utilities.loggerFor
|
||||
import org.apache.activemq.artemis.api.core.SimpleString
|
||||
import org.apache.activemq.artemis.api.core.TransportConfiguration
|
||||
@ -68,6 +69,8 @@ class ArtemisMessagingService(val directory: Path, val myHostPort: HostAndPort)
|
||||
|
||||
/** Temp helper until network map is established. */
|
||||
fun makeRecipient(hostAndPort: HostAndPort): SingleMessageRecipient = Address(hostAndPort)
|
||||
fun makeRecipient(hostname: String) = makeRecipient(toHostAndPort(hostname))
|
||||
fun toHostAndPort(hostname: String) = HostAndPort.fromString(hostname).withDefaultPort(Node.DEFAULT_PORT)
|
||||
}
|
||||
|
||||
private lateinit var mq: EmbeddedActiveMQ
|
||||
|
Loading…
x
Reference in New Issue
Block a user