Options
All
  • Public
  • Public/Protected
  • All
Menu

Raw event.

Hierarchy

Index

Constructors

constructor

  • internal

    For internal use in framework only. Do not use in application code.

    Create a Raw event instance.

    Parameters

    • topic: string

      the topic this Raw event is published on

    • eventData: RawEventData

      data associated with this Raw event

    • Optional options: {}

      binding-specific publication options (optional)

      • [key: string]: any

    Returns RawEvent

Properties

eventRequest

eventRequest: CommunicationEvent<CommunicationEventData> = ...
internal

For internal use in framework only. Do not use in application code.

Readonly options

options: {}

Binding-specific publication options.

Type declaration

  • [key: string]: any

topic

topic: string

Publication topic for this topic-based event.

Accessors

data

  • get data(): T

eventType

eventTypeFilter

  • get eventTypeFilter(): string

responseEventType

sourceId

  • get sourceId(): string
  • set sourceId(sourceId: string): void

Methods

Static isValidEventFilter

  • isValidEventFilter(name: string): boolean
  • Determines whether the given name is valid as an event filter for Coaty communication.

    Event filters are used for Coaty communication event filtering, e.g. to filter a communication namespace, an object type, a channel identifier, or a remote operation.

    An event filter is valid for communication if it is non-empty and does not contain the following characters: NULL (U+0000), # (U+0023), + (U+002B), / (U+002F).

    Parameters

    • name: string

      an event filter

    Returns boolean

    true if the given name can be used for event filtering; false otherwise

Static withTopicAndPayload

  • withTopicAndPayload(topic: string, payload: string | Uint8Array, options?: {}): RawEvent
  • Create a RawEvent instance for the given publication topic and payload.

    remarks

    The publication topic of the Raw event must be in a valid binding-specific format that corresponds with the configured communication binding. The Raw event is not published if the topic is invalid or has a Coaty-event-like shape.

    Parameters

    • topic: string

      the publication topic

    • payload: string | Uint8Array

      a payload string or Uint8Array (or Buffer in Node.js, a subclass thereof) to be published on the given topic

    • Optional options: {}

      binding-specific publication options (optional)

      • [key: string]: any

    Returns RawEvent

Generated using TypeDoc