Options
All
  • Public
  • Public/Protected
  • All
Menu

Call event for invoking a remote operation call.

Hierarchy

Index

Constructors

constructor

  • internal

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

    Create a Call event instance.

    throws

    if operation name is not in a valid format

    Parameters

    • operation: string

      the operation name of this Call event

    • eventData: CallEventData

      data associated with this Call event

    Returns CallEvent

Properties

eventRequest

eventRequest: CommunicationEvent<CommunicationEventData> = ...
internal

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

returnEvent

returnEvent: (event: ReturnEvent) => void

Type declaration

    • Respond to an observed Call event by returning the given Return event with the result yielded by executing the Call event's operation.

      Parameters

      Returns void

Accessors

data

  • get data(): T

eventType

eventTypeFilter

  • get eventTypeFilter(): string

operation

  • get operation(): string

responseEventType

sourceId

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

Methods

ensureValidResponseParameters

  • internal

    For internal use in framework only.

    throws

    if the given Return event data does not correspond to the event data of this Call event.

    Parameters

    Returns void

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 with

  • Create a CallEvent instance for invoking a remote operation call with the given operation name, parameters (optional), and a context filter (optional).

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

    Parameters must be either by-position through a JSON array or by-name through a JSON object. If a context filter is specified, the given remote call is only executed if the filter conditions match a context object provided by the remote end.

    throws

    if operation name is not in a valid format

    Parameters

    • operation: string

      a non-empty string containing the name of the operation to be invoked

    • Optional parameters: any[] | {}

      holds the parameter values to be used during the invocation of the operation (optional)

    • Optional filter: ContextFilter

      a context filter that must match a given context object at the remote end (optional)

    Returns CallEvent

Generated using TypeDoc