Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientListSnapshot

The ClientListSnapshot class is used to load a list of clientIDs for the clients currently on the server. For any client that is logged in, both a clientID and a userID are included in the list.

The list of client IDs retrieved by ClientListSnapshot is a one-time snapshot of the state of the server, and is not kept up to date after it is loaded.

Hierarchy

Index

Constructors

constructor

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

getClientList

  • getClientList(): { clientID: string; userID: string | null }[] | null
  • Returns an array of generic data objects containing the clientIDs and, for logged in clients, the userIDs of the clients on the server. For clients that are not logged in, the value of the userID variable is null.

    Returns { clientID: string; userID: string | null }[] | null

    [] | null}

getListeners

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

    • type: string

    Returns EventListener[]

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