Class ApiConnector

ApiConnector provide connection to dcorejs-lib apis

export
class

ApiConnector

Hierarchy

  • ApiConnector

Index

Constructors

constructor

  • new ApiConnector(apiAddresses: string[], api: any, testConnectionQuality?: boolean, connectionStatusCallback?: function): ApiConnector

Accessors

apiAddresses

  • get apiAddresses(): string[]

isConnected

  • get isConnected(): boolean

Methods

closeConnection

  • closeConnection(): void

connection

  • connection(): Promise<void>
  • Return promise of connection. Once connection is established Promise is resolved and is able to run operations on apis. Closed connection wil not be connected. To reopen closed connection use openConnection().

    Returns Promise<void>

    Connection promise.

openConnection

  • openConnection(): Promise<any>
  • Opens WS connection based on initialize configuration.

    Returns Promise<any>

    Connection promise.

Powered by DECENT