Options
All
  • Public
  • Public/Protected
  • All
Menu

The RoomListSnapshot class is used to load a list of fully qualified roomIDs for all rooms on the server or all rooms with a given qualifier.

The list of room IDs retrieved by RoomListSnapshot is a one-time snapshot of the state of the server, and is not kept up to date after it is loaded. To update a RoomListSnapshot object to match latest the state of the server, pass that object to Orbiter.updateSnapshot method.

Hierarchy

Index

Constructors

constructor

  • new RoomListSnapshot(qualifier?: undefined | string, recursive?: boolean): RoomListSnapshot
  • Parameters

    • Optional qualifier: undefined | string

      The room id qualifier of the rooms that should be included in the list. For a server-wide room list, supply null for qualifier and true for recursive. For a list of rooms with no qualifier, supply null for qualifier and false for recursive. For a list of rooms with the qualifier "chat.sports", supply "chat.sports" for qualifier and false for recursive. In Reactor 1.0.0, recursion is supported when qualifier is null only.

    • Default value recursive: boolean = false

      Indicates whether the room list for this snapshot should include rooms directly qualified by the specified qualifier only, or also all rooms qualified by all child qualifiers of the specified qualifier.

    Returns RoomListSnapshot

Properties

Readonly target

target: EventDispatcher

Methods

addEventListener

  • addEventListener(type: string, listener: Function, thisArg: any, priority?: number): boolean
  • Parameters

    • type: string
    • listener: Function
    • thisArg: any
    • Default value priority: number = 0

    Returns boolean

dispatchEvent

  • dispatchEvent(event: Event): void
  • Parameters

    • event: Event

    Returns void

getListeners

  • getListeners(type: string): EventListener[]
  • Parameters

    • type: string

    Returns EventListener[]

getQualifier

  • getQualifier(): string | null
  • Returns the qualifier of the rooms that are included in this snapshot.

    Returns string | null

getRecursive

  • getRecursive(): boolean
  • Indicates whether the room list for this snapshot includes rooms directly qualified by the specified qualifier only, or also all rooms qualified by all child qualifiers of the specified qualifier.

    Returns boolean

getRoomList

  • getRoomList(): string[] | null
  • Returns an array of the fully qualified roomIDs of the rooms with the qualifier specified by this snapshot.

    Returns string[] | null

getStatus

  • getStatus(): Status | undefined
  • Returns the status of the most recent snapshot load-operation. If a load operation is currently in progress, getStatus() returns null. The possible return values of getStatus() depend on the snapshot type.

    Returns Status | undefined

hasListener

  • hasListener(type: string, listener: Function, thisArg: any): boolean
  • Parameters

    • type: string
    • listener: Function
    • thisArg: any

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: Function, thisArg: any): boolean
  • Parameters

    • type: string
    • listener: Function
    • thisArg: any

    Returns boolean

updateInProgress

  • updateInProgress(): boolean | undefined
  • Indicates whether the snapshot is currently loading data. While an update is in progress, further requests to update the snapshot are ignored.

    Returns boolean | undefined