Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace announcer

This namespace defines every thing related to the system announcement.

The system announcement provides a global way to communicate between processes (applications/services) using the subscribe/publish mechanism

Index

Variables

listeners

Placeholder of all global events listeners

observable

observable: Announcer = new API.Announcer()

The global announcer object that manages global events and callbacks

quota

quota: 0

This variable is used to allocate the id of all messages passing between publishers and subscribers in the system announcement

Functions

getMID

  • getMID(): number

on

  • on(e: string, f: (d: any) => void, a: BaseModel): void
  • Subscribe to a global event

    export

    Parameters

    • e: string

      event name

    • f: (d: any) => void

      event callback

        • (d: any): void
        • Parameters

          • d: any

          Returns void

    • a: BaseModel

      the process (Application/service) related to the callback

    Returns void

oserror

osfail

osinfo

ostrigger

  • ostrigger(e: string, d: any): void

trigger

  • trigger(e: string, d: any): void
  • Trigger a global event

    export

    Parameters

    • e: string

      event name

    • d: any

      data passing to all related callback

    Returns void

unregister

  • Unregister a process (application/service) from the global announcement system

    export

    Parameters

    Returns void