Options
All
  • Public
  • Public/Protected
  • All
Menu

A Location Service Client API. This model provides promise based APIs for managing service registrations.

interface

Hierarchy

  • LocationService

Index

Methods

  • listByHostname(hostname: string): Promise<Location[]>
  • Resolves the location for a connection, if not found waits for the event to arrive within specified time limit. Returns undefined if both failed.

    Parameters

    • connection: Connection

      The Connection to be located

    • within: number

      Time within which the connection to be resolved

    • unit: TimeUnit

      TimeUnit Ex: millis, seconds, hours, etc.

    Returns Promise<Option<Location>>

    Location as Promise if available

  • Tracks the connection and send events for modification or removal of its location.

    Parameters

    • connection: Connection

      The Connection to be tracked

    Returns (onEvent: (trackingEvent: TrackingEvent) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription which provides a handle to cancel the subscription

      • Tracks the connection and send events for modification or removal of its location.

        Parameters

        • onEvent: (trackingEvent: TrackingEvent) => void

          A function which gets triggered whenever a tracking event is received

        • Optional onError: (error: ServiceError) => void

          a optional error callback which gets called on receiving error. it can be Parsing error or a Runtime error [for ex. Gateway exception]

        • Optional onClose: () => void

          a optional close callback which gets called when the connection is closed.

            • (): void
            • Returns void

        Returns Subscription

        Subscription which provides a handle to cancel the subscription

  • unregister(connection: Connection): Promise<"Done">

Generated using TypeDoc