Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IBroker

This represents a broker instance that is used to obtain API connections to an akera.io application server (connection factory).

Hierarchy

  • IBroker

Implemented by

Index

Properties

config

The broker configuration used when requesting new connections.

name

name: string

The broker name (alias for fail-safe configurations).

offline

offline: boolean

Flag set if connections can't be established to that broker (offline).

Methods

endConnection

  • endConnection(connection: IConnection): Promise<boolean>
  • This method should be called once the connection is not needed anymore. Depending on the actual implementation the broker instance can use connection pooling and keep the connection open for later reuse.

    Parameters

    • connection: IConnection

      The connection that is not needed anymore.

    Returns Promise<boolean>

getConnection

  • getConnection(): Promise<IConnection>
  • This method, when fulfilled, returns an API connection to the application server or gets rejected in case of connection error.

    Returns Promise<IConnection>