aries / net.globalid.aries.message.outbound / toOutboundContext

toOutboundContext

fun AgentMessage.toOutboundContext(connection: ConnectionRecord): Single<OutboundMessageContext>

Returns an OutboundMessageContext constructed from an AgentMessage and a given ConnectionRecord. This only puts the connection ID in the context.

Parameters

connection - is a ConnectionRecord to get the ID from.

fun AgentMessage.toOutboundContext(connectionContext: ConnectionContext): Single<OutboundMessageContext>

Returns an OutboundMessageContext constructed from an AgentMessage and a given ConnectionContext. The connection context from the record is checked and the corresponding outbound context is constructed.

Parameters

connectionContext - the connection context for this message