Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MissingTopicHandler

Handler called when a client session subscribes using a topic selector that matches no topics. This interface must be implemented by the user.

Handler instances can be registered using addMissingTopicHandler.

class

MissingTopicHandler

Hierarchy

  • MissingTopicHandler

Index

Methods

onClose

  • onClose(path: string): void
  • Called when the handler is closed. The handler will be closed if the session is closed, or if the handler is unregistered.

    Once closed, no further calls will be made for the handler.

    Parameters

    • path: string

      the registration path

    Returns void

onError

  • onError(path: string, error: any): void
  • Notification of a contextual error related to this handler. This is analogous to an unchecked exception being raised. Situations in which onError is called include the session being closed before the handler is registered, a communication timeout, or a problem with the provided parameters. No further calls will be made to this handler.

    Parameters

    • path: string

      the registration path

    • error: any

      the error

    Returns void

onMissingTopic

  • Called when a client session subscribes to a topic selector that selects no topics, and the topic path belongs to part of the topic tree for which this handler was registered.

    Parameters

    Returns void

onRegister

  • onRegister(path: string, deregister: function): void
  • Called when the handler has been successfully registered with the server.

    A session can register a single handler for a given branch of the topic tree. If there is already a handler registered for the topic path the operation will fail and onClose will be called.

    To deregister the handler, call the deregister function supplied.

    Parameters

    • path: string

      the registration path

    • deregister: function

      a function that may be called to deregister this handler. The function will resolve when the handler has been deregistered.

        • (): Promise<void>
        • Returns Promise<void>

    Returns void