mirror of
https://github.com/corda/corda.git
synced 2025-05-29 13:44:25 +00:00
Merged in rnicoll-direct-request-message (pull request #258)
Add DirectRequestMessage
This commit is contained in:
commit
380233a474
@ -2,6 +2,7 @@ package com.r3corda.protocols
|
|||||||
|
|
||||||
import com.r3corda.core.crypto.Party
|
import com.r3corda.core.crypto.Party
|
||||||
import com.r3corda.core.messaging.MessageRecipients
|
import com.r3corda.core.messaging.MessageRecipients
|
||||||
|
import com.r3corda.core.messaging.SingleMessageRecipient
|
||||||
import com.r3corda.core.node.services.NetworkMapCache
|
import com.r3corda.core.node.services.NetworkMapCache
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,6 +14,17 @@ interface ServiceRequestMessage {
|
|||||||
fun getReplyTo(networkMapCache: NetworkMapCache): MessageRecipients
|
fun getReplyTo(networkMapCache: NetworkMapCache): MessageRecipients
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A message which specifies reply destination as a specific endpoint such as a monitoring client. This is of particular
|
||||||
|
* use where we want to address a specific endpoint, not necessarily a specific user (for example if the same user logs
|
||||||
|
* in on two machines, we want to consistently deliver messages as part of a session, to the same machine the session
|
||||||
|
* started on).
|
||||||
|
*/
|
||||||
|
interface DirectRequestMessage: ServiceRequestMessage {
|
||||||
|
val replyToRecipient: SingleMessageRecipient
|
||||||
|
override fun getReplyTo(networkMapCache: NetworkMapCache): MessageRecipients = replyToRecipient
|
||||||
|
}
|
||||||
|
|
||||||
interface PartyRequestMessage : ServiceRequestMessage {
|
interface PartyRequestMessage : ServiceRequestMessage {
|
||||||
|
|
||||||
val replyToParty: Party
|
val replyToParty: Party
|
||||||
|
Loading…
x
Reference in New Issue
Block a user