Options
All
  • Public
  • Public/Protected
  • All
Menu

Channel event.

Hierarchy

Index

Constructors

constructor

  • internal

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

    Create a Channel event instance.

    The channel identifier must be a non-empty string that does not contain the following characters: NULL (U+0000), # (U+0023), + (U+002B), / (U+002F).

    throws

    if channel identifier is not in a valid format

    Parameters

    • channelId: string

      the channel identifier of this Channel event

    • eventData: ChannelEventData

      data associated with this Channel event

    Returns ChannelEvent

Properties

eventRequest

eventRequest: CommunicationEvent<CommunicationEventData> = ...
internal

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

Accessors

channelId

  • get channelId(): string

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 withObject

  • Create a ChannelEvent instance for delivering the given object.

    throws

    if channel identifier is not in a valid format

    Parameters

    • channelId: string
    • object: CoatyObject

      the object to be channelized

    • Optional privateData: any

      application-specific options (optional)

    Returns ChannelEvent

Static withObjects

  • Create a ChannelEvent instance for delivering the given objects.

    throws

    if channel identifier is not in a valid format

    Parameters

    • channelId: string
    • objects: CoatyObject[]

      the objects to be channelized

    • Optional privateData: any

      application-specific options (optional)

    Returns ChannelEvent

Generated using TypeDoc