Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RoomClassRegistry

RoomClassRegistry maintains a catalog of the classes that are used to represent the rooms in an application. By default, rooms are represented by the Room class. To specify a custom class for a room with a given ID, use setRoomClass() before creating, joining, or observing the room.

Hierarchy

  • RoomClassRegistry

Index

Constructors

constructor

Methods

clearRoomClass

  • clearRoomClass(roomID: string): void
  • Removes the current custom class association for the specified roomID.

    Parameters

    • roomID: string

    Returns void

getRoomClass

  • getRoomClass(roomID: string): any
  • Returns the current custom class association for the specified roomID.

    Parameters

    • roomID: string

    Returns any

setRoomClass

  • setRoomClass(roomID: string, roomClass: {}): void
  • Specifies the class that will be used to represent the room with the specified roomID. If the current client joins or observes the specified room, RoomManager will create an instance of the specified roomClass, and that instance will be returned by all RoomManager methods that provide access to the room. The specified roomClass must extend the built-in Room class.

    Parameters

    • roomID: string
    • roomClass: {}

    Returns void