Skip to main content

ConnectionsManager

@hyperledger/identus-sdk v7.0.0


@hyperledger/identus-sdk / overview / ConnectionsManager

Class: ConnectionsManager

Defined in: src/edge-agent/connections/ConnectionsManager.ts:13

ConnectionsManager is responsible for handling Connections and Mediators

Mediators are a Connection where we periodically fetch messages from

ConnectionsManager

Constructors

Constructor

new ConnectionsManager(): ConnectionsManager

Returns

ConnectionsManager

Accessors

mediator

Get Signature

get mediator(): Nil | MediatorConnection

Defined in: src/edge-agent/connections/ConnectionsManager.ts:18

Returns

Nil | MediatorConnection

Methods

add()

add(connection: Connection): void

Defined in: src/edge-agent/connections/ConnectionsManager.ts:48

add a Connection

Parameters

ParameterTypeDescription
connectionConnection

Returns

void


addMediator()

addMediator(mediator: Connection): void

Defined in: src/edge-agent/connections/ConnectionsManager.ts:56

add a Connection and mark it as a Mediator

Parameters

ParameterTypeDescription
mediatorConnection

Returns

void


find()

find(uri: string): Connection | undefined

Defined in: src/edge-agent/connections/ConnectionsManager.ts:85

Search for a Connection by it's unique identifier

Parameters

ParameterTypeDescription
uristring

Returns

Connection | undefined


remove()

remove(connection: string | Connection): Promise<void>

Defined in: src/edge-agent/connections/ConnectionsManager.ts:69

Remove a Connection this but just means the connection will be removed from the current storage

Parameters

ParameterTypeDescription
connectionstring | Connection

Returns

Promise<void>


stop()

stop(): Promise<void>

Defined in: src/edge-agent/connections/ConnectionsManager.ts:35

close all active connections

Returns

Promise<void>