aries / net.globalid.aries.agents / DefaultAgent

DefaultAgent

class DefaultAgent : Agent

An implementation of Agent using EnvelopeService to unpack incoming packed messages for processing and a list of MessageHandler that handle the unpacked messages. In addition, ConnectionService is used to connect a given unpacked agent message to a specific connection. Already unpacked messages are checked for a service decorator and are sent to the handlers for processing.

Constructors

<init>

An implementation of Agent using EnvelopeService to unpack incoming packed messages for processing and a list of MessageHandler that handle the unpacked messages. In addition, ConnectionService is used to connect a given unpacked agent message to a specific connection. Already unpacked messages are checked for a service decorator and are sent to the handlers for processing.

DefaultAgent(wallet: Wallet, pool: Pool, options: AgentOptions, provisioningService: ProvisioningService, connectionService: ConnectionService, envelopeService: EnvelopeService, handlers: List<MessageHandler>, messageDispatcher: MessageDispatcher)

Properties

options

is the agent's options

val options: AgentOptions

pool

is the agent's pool for communication with the ledger

val pool: Pool

wallet

is the agent's wallet

val wallet: Wallet

Functions

dispatch

See Agent.dispatch.

fun dispatch(outboundContext: OutboundMessageContext): Completable

dispatchAndAwait

See Agent.dispatchAndAwait.

fun dispatchAndAwait(outboundContext: OutboundMessageContext): Maybe<String>

getProvisioningRecord

See Agent.getProvisioningRecord.

fun getProvisioningRecord(): Single<ProvisioningRecord>

process

See Agent.process.

fun process(packedMessage: String): Single<MessageProcessResponse>
fun process(agentMessage: AgentMessage): Single<MessageProcessResponse>

setProvisioningRecord

See Agent.setProvisioningRecord.

fun setProvisioningRecord(record: ProvisioningRecord): Completable

unpack

See Agent.unpack.

fun unpack(packedMessage: String): Single<UnpackedMessage>