Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Operator

Index

Properties

Private connections

connections: Array<Connection> = []

Methods

close

  • This method will close the port used by the connection and remove it from the list of managed connections. This will prevent group emit or group requests from being triggered on the connection.

    Parameters

    Returns Operator

    Returns Operator instance

connect

emit

  • emit(event: string, payload?: any): Operator
  • This method will emit an event on all the managed connections.

    Parameters

    • event: string

      The name of the event to emit.

    • Optional payload: any

      Payload to be sent with the event.

    Returns Operator

    Returns Operator instance.

request

  • request<T>(event: string, payload?: any, options?: RequestOptions): Array<Promise<T>>
  • This method will make a request on all the managed connections. It returns an array containing all the promises it is then up to you manage their completion.

    Type parameters

    • T

    Parameters

    • event: string

      The name of the event to emit.

    • Optional payload: any

      Payload to be sent with the event.

    • Optional options: RequestOptions

    Returns Array<Promise<T>>

    An array of promises which can contain any payload

requestAll

  • requestAll<T>(event: string, payload?: any, options?: RequestOptions): Promise<Array<T>>
  • This method will make a request on all the managed connections. It returns a promise and will resolve or reject after all the connections's promises have successfully fulfilled or after a single error is thrown.

    Type parameters

    • T

    Parameters

    • event: string

      The name of the event to emit.

    • Optional payload: any

      Payload to be sent with the event.

    • Optional options: RequestOptions

    Returns Promise<Array<T>>

    A promise which can contain any payload

requestRace

  • requestRace<T>(event: string, payload?: any, options?: RequestOptions): Promise<T>
  • This method will make a request on all the managed connections. It returns a promise and will resolve or reject on the first connection to make a response.

    Type parameters

    • T

    Parameters

    • event: string

      The name of the event to emit.

    • Optional payload: any

      Payload to be sent with the event.

    • Optional options: RequestOptions

    Returns Promise<T>

    A promise which can contain any payload

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc