Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EventService

A Event Service API provides client side methods to interact with the event server.

interface

Hierarchy

  • EventService

Index

Methods

get

pSubscribe

  • pSubscribe(subsystem: "AOESW" | "APS" | "CIS" | "CLN" | "CRYO" | "CSW" | "DMS" | "DPS" | "ENC" | "ESEN" | "ESW" | "HNDL" | "HQ" | "IRIS" | "LGSF" | "M1COAT" | "M1CS" | "M1S" | "M2COAT" | "M2S" | "M3S" | "MODHIS" | "NFIRAOS" | "OSS" | "REFR" | "SCMS" | "SER" | "SOSS" | "STR" | "SUM" | "TCS" | "TINS" | "WFOS" | "Container", maxFrequency: number, pattern: string): (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription
  • This API subscribes to events of all the EventKeys specified using a Subsystem and a pattern to match the remaining Event Key and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

    Parameters

    • subsystem: "AOESW" | "APS" | "CIS" | "CLN" | "CRYO" | "CSW" | "DMS" | "DPS" | "ENC" | "ESEN" | "ESW" | "HNDL" | "HQ" | "IRIS" | "LGSF" | "M1COAT" | "M1CS" | "M1S" | "M2COAT" | "M2S" | "M3S" | "MODHIS" | "NFIRAOS" | "OSS" | "REFR" | "SCMS" | "SER" | "SOSS" | "STR" | "SUM" | "TCS" | "TINS" | "WFOS" | "Container"

      subscription to be made under the subsystem

    • maxFrequency: number

      the duration which determines the frequency with which events are received

    • pattern: string

      optional pattern to match against the event key.supported glob-style patterns

                         - h?llo subscribes to hello, hallo and hxllo
                         - h*llo subscribes to hllo and heeeello
                         - h[ae]llo subscribes to hello and hallo, but not hillo
      

    Returns (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription

      • This API subscribes to events of all the EventKeys specified using a Subsystem and a pattern to match the remaining Event Key and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

        Parameters

        • onEvent: (event: Event) => void

          the function which gets triggered on receiving an event

            • the function which gets triggered on receiving an event

              Parameters

              Returns void

        • 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]

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

              Parameters

              Returns void

        • Optional onClose: () => void

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

            • (): void
            • a optional close callback which gets called when the connection is closed.

              Returns void

        Returns Subscription

        Subscription

publish

  • publish(event: Event): Promise<"Done">

subscribe

  • This API subscribes to multiple eventKeys and receive events at every frequency and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

    Parameters

    • eventKeys: Set<EventKey>

      Set of event keys to be subscribed.

    • maxFrequency: number

      the duration which determines the frequency with which events are received

    Returns (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription

      • This API subscribes to multiple eventKeys and receive events at every frequency and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

        Parameters

        • onEvent: (event: Event) => void

          the function which gets triggered on receiving an event

            • the function which gets triggered on receiving an event

              Parameters

              Returns void

        • 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]

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

              Parameters

              Returns void

        • Optional onClose: () => void

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

            • (): void
            • a optional close callback which gets called when the connection is closed.

              Returns void

        Returns Subscription

        Subscription

Generated using TypeDoc