mirror of
https://github.com/corda/corda.git
synced 2025-06-11 20:01:46 +00:00
Messaging interface now exposes the nodes own address.
This commit is contained in:
@ -130,6 +130,8 @@ public class InMemoryNetwork {
|
|||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
protected val pendingRedelivery = LinkedList<Message>()
|
protected val pendingRedelivery = LinkedList<Message>()
|
||||||
|
|
||||||
|
override val myAddress: SingleMessageRecipient = handle
|
||||||
|
|
||||||
protected val backgroundThread = if (manuallyPumped) null else thread(isDaemon = true, name = "In-memory message dispatcher ") {
|
protected val backgroundThread = if (manuallyPumped) null else thread(isDaemon = true, name = "In-memory message dispatcher ") {
|
||||||
while (!currentThread.isInterrupted) {
|
while (!currentThread.isInterrupted) {
|
||||||
try {
|
try {
|
||||||
|
@ -65,6 +65,9 @@ interface MessagingService {
|
|||||||
* Returns an initialised [Message] with the current time, etc, already filled in.
|
* Returns an initialised [Message] with the current time, etc, already filled in.
|
||||||
*/
|
*/
|
||||||
fun createMessage(topic: String, data: ByteArray): Message
|
fun createMessage(topic: String, data: ByteArray): Message
|
||||||
|
|
||||||
|
/** Returns an address that refers to this node */
|
||||||
|
val myAddress: SingleMessageRecipient
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user