aries / net.globalid.aries.features.connection.models.message / ConnectionProblemReportMessage

ConnectionProblemReportMessage

@JsonClass(true) data class ConnectionProblemReportMessage : AgentMessage

Represents a problem report message used to communicate problems during the request and response phase. There are no errors during the invitation phase.

Constructors

<init>

Represents a problem report message used to communicate problems during the request and response phase. There are no errors during the invitation phase.

ConnectionProblemReportMessage(problemCode: String, explanation: String)

Properties

explanation

contains a human readable message indicating the problem.

val explanation: String

problemCode

: Errors are sent using the same problem report type. Differentiating between the different problems is done via the problem code property. The problem code must be one of:

val problemCode: String

Companion Object Properties

PROBLEM_REQUEST_NOT_ACCEPTED

const val PROBLEM_REQUEST_NOT_ACCEPTED: String

PROBLEM_REQUEST_PROCESSING_ERROR

const val PROBLEM_REQUEST_PROCESSING_ERROR: String

PROBLEM_RESPONSE_NOT_ACCEPTED

const val PROBLEM_RESPONSE_NOT_ACCEPTED: String

PROBLEM_RESPONSE_PROCESSING_ERROR

const val PROBLEM_RESPONSE_PROCESSING_ERROR: String

Extension Functions

addThread

Adds the thread decorator with threadId to the current message

fun AgentMessage.addThread(threadId: String): Unit

getThreadId

Returns the message thread id

fun AgentMessage.getThreadId(): String

toOutboundContext

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

fun AgentMessage.toOutboundContext(connection: ConnectionRecord): 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.

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

toOutboundMessage

Returns an OutboundMessage constructed from an AgentMessage and a given ConnectionRecord. The outbound message might not be constructable, based on the state of the record. In that case, an error is returned.

fun AgentMessage.toOutboundMessage(record: ConnectionRecord): Single<OutboundMessage>

Returns an OutboundMessage constructed from an AgentMessage and a given ServiceDecorator. In this case, the message can always be constructed as the decorator contains all the needed data. We generate a new key pair for this message so that the receiver can send a response (it needs to be encrypted with our public/verification key).

fun AgentMessage.toOutboundMessage(agent: Agent, serviceDecorator: ServiceDecorator): Single<OutboundMessage>