sealed class UnpackedMessageContext
Represents an unpacked agent message with additional context. Message can be associated with some form of "connection context" - who the message is from and/or how do we send a message back to them. In some cases, no context is needed (e.g. connection invitation).
Connection |
An UnpackedMessageContext that relates an agent message to a connection backed by a connection record (from the wallet). data class Connection : UnpackedMessageContext |
None |
An UnpackedMessageContext that does not have any additional context associated with it. An example of such message is a connection invitation, as the invitation itself contains context for responding. It might also prove useful if/when implementing RFC 0434: Out-of-Band Protocols. data class None : UnpackedMessageContext |
Service |
An UnpackedMessageContext that relates an agent message to a service decorator. This message thus doesn't have a permanent connection associated with it and the sender is unknown - the decorator contains only data to allow sending a response back. data class Service : UnpackedMessageContext |
message |
is the (unpacked) agent message. abstract val message: AgentMessage |
getConnectionContext |
Returns a ConnectionContext representing this UnpackedMessageContext. The returned context can be saved in a wallet record for example, to associate a "return route" (where to send the response) with the record. fun getConnectionContext(): Single<ConnectionContext> |