Options
All
  • Public
  • Public/Protected
  • All
Menu

Return event for providing the response of executing a remote operation call.

Hierarchy

Index

Constructors

constructor

Properties

eventRequest

eventRequest: CallEvent
internal

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

Associated request 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 withError

  • withError(code: number, message: string, executionInfo?: any): ReturnEvent
  • Create a ReturnEvent instance for a remote operation call that yields an error.

    The error code given is an integer that indicates the error type that occurred, either a predefined error or an application defined one. Predefined error codes are defined by the RemoteCallErrorCode enum. Predefined error codes are within the range -32768 to -32000. Application defined error codes must be defined outside this range.

    The error message provides a short description of the error. Predefined error messages exist for all predefined error codes (see enum RemoteCallErrorMessage).

    Parameters

    • code: number

      an integer that indicates the error type that occurred

    • message: string

      a string providing a short description of the error

    • Optional executionInfo: any

      information about execution environment (optional)

    Returns ReturnEvent

Static withResult

  • withResult(result: any, executionInfo?: any): ReturnEvent
  • Create a ReturnEvent instance for a remote operation call that successfully yields a result.

    Parameters

    • result: any

      the result value to be returned (any JSON data type)

    • Optional executionInfo: any

      information about execution environment (optional)

    Returns ReturnEvent

Generated using TypeDoc