Class ConnectorAbstract

Hierarchy

Constructors

  • Parameters

    • host: string

      the host to connect to

    • port: number

      the port to connect to

    • secure: boolean

      true for an secure connection

    • basePath: string

      The base path of the api endpoint

    Returns Connector

Properties

basePath: string

The base path of the api endpoint

host: string

the host to connect to

origin: string = ...

the origin do not contains the base path

port: number

the port to connect to

secure: boolean

true for an secure connection

DEFAULT_BASE_PATH: "/v1" = '/v1'
HTTP_DOMAIN: ".app.baqend.com" = '.app.baqend.com'
RESPONSE_HEADERS: string[] = ...

An array of all exposed response headers

connections: {
    [origin: string]: Connector;
} = {}

Array of all created connections

Type declaration

connectors: (Class<Connector> & typeof Connector)[] = []

Array of all available connector implementations

Methods

  • Convert received data to the requested response entity type

    Returns

    Parameters

    • response: Response

      The response object

    • entity: any

      The received data

    • type: null | ResponseBodyType

      The requested response format

    Returns any

  • Returns

    Parameters

    • message: Message
    • response: Response

      The received response headers and data

    Returns Promise<any>

  • Convert the message entity to the sendable representation

    Returns

    Parameters

    • message: Message

      The message to send

    Returns void

  • Returns

    Parameters

    • host: string

      or location

    • Optional port: number
    • Optional secure: boolean
    • Optional basePath: string

      The basepath of the api

    Returns Connector

  • Indicates id this connector is usable in the current runtime environment This method must be overwritten in subclass implementations

    Returns

    true if this connector is usable in the current environment

    Parameters

    • host: string

      the host to connect to

    • port: number

      the port to connect to

    • secure: boolean

      true for an secure connection

    • basePath: string

      The base path of the api endpoint

    Returns boolean

  • Parameters

    • host: string
    • port: number
    • secure: boolean
    • basePath: string

    Returns string

Generated using TypeDoc