Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TopicSelector

A TopicSelector is a value that identifies one or more topics.

Depending on where it is used, a selector may be evaluated by either the server or the client library. For example, the server evaluates the selector used to subscribe to a topic. In contrast, the selector used to register a topic handler is evaluated by the client. Applications do not normally need to evaluate selectors, but may do so using selects.

A client may receive a selector providing the context for certain operations. For example, to allow it to veto subscriptions. Limited ability to query the selector's TopicSelector.type and associated expression is provided.

Selectors may be created using TopicSelectors.

Hierarchy

  • TopicSelector

Index

Properties

Methods

Properties

expression

expression: string

The original expression of this selector

prefix

prefix: string

The maximum topic path prefix from this selector

type

type: Type

The type of this selector

Methods

selects

  • selects(topicPath: string): boolean
  • Evaluate this selector against a topic path

    Parameters

    • topicPath: string

      the topic path

    Returns boolean

    if this selector selects the topic path

toString

  • toString(): string
  • Convert the topic selector to a string

    Returns string

    the original expression of the selector