Class EventBusAbstract

A simple event bus that can be extended by other classes to provide event-driven functionality. It strictly handles messages defined via MessageDefinition.

Hierarchy (view full)

Constructors

Properties

listeners: Map<string, MessageEventHandler<any>[]> = ...

Methods

  • Gets the list of message types that have listeners registered

    Returns string[]

    The list of message types

  • Triggers all listeners for a given message type

    Parameters

    • type: string

      The message type

    • envelope: MessageEnvelope<any>

      The message envelope containing the payload

    • sdk: ISDK

      The SDK instance

    • widget: IWidget

      The widget instance

    Returns void