Interface TopicEventService

The Topic Event Service is used to broadcast events as topics within the App Runtime. The Topic Event Service is registered as ct.framework.api.EventService in the app runtime.

interface TopicEventService {
    postEvent(topic: string, evtProperties?: Record<string, any>): void;
    sendEvent(topic: string, evtProperties?: Record<string, any>): void;
}

Methods

  • Asynchronously broadcasts an event to the EventListeners.

    Parameters

    • topic: string

      Event topic

    • OptionalevtProperties: Record<string, any>

      Event properties

    Returns void

  • Synchronously broadcasts an event to the EventListeners.

    Parameters

    • topic: string

      Event topic

    • OptionalevtProperties: Record<string, any>

      Event properties

    Returns void