aries / net.globalid.aries.features.connection / DefaultConnectionService / createResponse

createResponse

open fun createResponse(agent: Agent, recordId: String): Single<Pair<SentResponse, ConnectionResponseMessage>>

See ConnectionService.createResponse.

Creates a response for a given record. If the record is in the ReceivedRequest state, we transition to the SentResponse state and then create the message. If we are already in the SentResponse state, we only (re)create the message. In any other state, we cannot create a response, so we throw an exception.