Options
All
  • Public
  • Public/Protected
  • All
Menu

Orbiter’s "snapshots" provide a traditional request/response mechanism for retrieving data on demand from Union Server; the Snapshot class is the abstract base class for all Orbiter "snapshot" classes, each of which loads a specific set of data from the server. For example, the ClientCountSnapshot class loads the number of clients currently connected to the server. The RoomSnapshot class loads a data manifest describing a particular room. To request a snapshot of data using a snapshot class, first create the desired snapshot object, then pass that object to the Orbiter.updateSnapshot method. Snapshots such as the preceding RoomListSnapshot object represent the state of the server at the time of the updateSnapshot() request only, and are not kept synchronized once loaded. All snapshot objects trigger SnapshotEvent.LOAD when data loads. Some snapshot objects also trigger SnapshotEvent.STATUS when the status of the load operation is received. For details, see SnapshotEvent.

Hierarchy

Index

Constructors

constructor

  • Returns Snapshot

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[]

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