aries / net.globalid.aries.features.connection / ConnectionService

ConnectionService

interface ConnectionService

Connection service manages connection records, create and accept invitations

Functions

createInvitation

Create invitation for connection. The recipient key in the invitation is the invitation key we have generated. We get the service endpoint, routing keys and the label from the provisioning record of the agent.

abstract fun createInvitation(agent: Agent, recordId: String?): Single<Pair<SentInvitation, ConnectionInvitationMessage>>

createRequest

Creates a request message from a record with the given ID.

abstract fun createRequest(agent: Agent, recordId: String): Single<Pair<SentRequest, ConnectionRequestMessage>>

createResponse

Creates a response message from a record with the given ID.

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

deleteConnection

Deletes a connection from the local store

abstract fun deleteConnection(agent: Agent, connectionId: String): Single<Boolean>

getConnection

Get the ConnectionRecord for given connection Id

abstract fun getConnection(agent: Agent, connectionId: String): Single<ConnectionRecord>

getConnectionByKey

Get the ConnectionRecord for the given key. Can be a connection key or our ver key.

abstract fun getConnectionByKey(agent: Agent, key: String): Single<ConnectionRecord>

getConnections

Get the list of ConnectionRecord for given query

abstract fun getConnections(agent: Agent, query: SearchQuery? = null, count: Int = 100): Single<List<ConnectionRecord>>

processInvitation

Saves the invitation to the wallet.

abstract fun processInvitation(agent: Agent, invitation: ConnectionInvitationMessage): Single<ReceivedInvitation>

processRequest

Processes a given connection request message.

abstract fun processRequest(agent: Agent, requestMessage: ConnectionRequestMessage, record: ConnectionRecord): Single<ReceivedRequest>

processRequestNotAccepted

Processes the request not accepted problem report.

abstract fun processRequestNotAccepted(agent: Agent, problemReportMessage: ConnectionProblemReportMessage): Completable

processRequestProcessingError

Processes the request processing error problem report. This error indicates that the request should be resent as-is.

abstract fun processRequestProcessingError(agent: Agent, problemReportMessage: ConnectionProblemReportMessage): Single<Pair<SentRequest, ConnectionRequestMessage>>

processResponse

Processes the connection response for a given connection

abstract fun processResponse(agent: Agent, responseMessage: ConnectionResponseMessage, record: ConnectionRecord): Single<Connected>

processResponseNotAccepted

Processes the response not accepted problem report.

abstract fun processResponseNotAccepted(agent: Agent, problemReportMessage: ConnectionProblemReportMessage): Completable

processResponseProcessingError

Processes the reponse processing error problem report. This error indicates that the response should be resent as-is.

abstract fun processResponseProcessingError(agent: Agent, problemReportMessage: ConnectionProblemReportMessage): Single<Pair<SentResponse, ConnectionResponseMessage>>

updateConnection

Updates a connection record.

abstract fun updateConnection(agent: Agent, record: ConnectionRecord): Completable

Inheritors

DefaultConnectionService

See ConnectionService.

open class DefaultConnectionService : ConnectionService