PrivmxEndpointContainer

Manages certificates, Platform sessions, and active connections. Implements event loop that can be started using startListening. Contains instance of CryptoApi.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Instance of CryptoApi.

Link copied to clipboard

Set of all active connection's IDs

Functions

Link copied to clipboard
open override fun close()

Closes event loop.

Link copied to clipboard
fun connect(enableModule: Set<Modules>, userPrivateKey: String, solutionId: String, bridgeUrl: String): PrivmxEndpoint

Creates a new connection.

Link copied to clipboard
fun disconnect(connectionId: Long?)

Disconnects connection matching given connectionId and removes it from the container. This method is recommended for disconnecting connections by their ID from the container.

Link copied to clipboard

Disconnects all connections and removes them from the container.

Link copied to clipboard
fun getEndpoint(connectionId: Long): PrivmxEndpoint?

Returns connection matching given connectionId.

Link copied to clipboard
fun setCertsPath(certsPath: String)

Sets path to the certificate used to create a secure connection to PrivMX Bridge. It checks whether a .pem file with certificate exists in certsPath and uses it if it does.

Link copied to clipboard

Starts event handling Thread.

Link copied to clipboard

Stops event loop.