Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CustomClient

A base class for the creation of custom client classes. Note that CustomClient's composed Client instance is not available from within the CustomClient class's constructor method. Initialization code that requires access to the composed Client instance should be placed in an init() method in the CustomClient subclass.

Note that CustomClient's composed Client instance is not available from within the CustomClient class's constructor method. Initialization code that requires access to the composed Client instance should be placed in an init() method in the CustomClient subclass.

Hierarchy

  • CustomClient

Index

Constructors

constructor

Methods

addEventListener

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

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

    Returns void

ban

  • ban(duration: number, reason: string | null): void
  • Parameters

    • duration: number
    • reason: string | null

    Returns void

deleteAttribute

  • deleteAttribute(attrName: string, attrScope?: undefined | string): void
  • Parameters

    • attrName: string
    • Optional attrScope: undefined | string

    Returns void

dispatchEvent

  • dispatchEvent(event: Event): void
  • Parameters

    • event: Event

    Returns void

getAccount

getAttribute

  • getAttribute(attrName: string, attrScope?: undefined | string): string | null
  • Parameters

    • attrName: string
    • Optional attrScope: undefined | string

    Returns string | null

getAttributes

  • getAttributes(): {} | null
  • Returns {} | null

getAttributesByScope

  • getAttributesByScope(scope?: undefined | string): {} | {} | null
  • Parameters

    • Optional scope: undefined | string

    Returns {} | {} | null

getClientID

  • getClientID(): string
  • Returns string

getClientManager

getConnectTime

  • getConnectTime(): number | null
  • Returns number | null

getConnectionState

getIP

  • getIP(): string | null
  • Returns string | null

getObservedRoomIDs

  • getObservedRoomIDs(): string[] | null
  • Returns string[] | null

getOccupiedRoomIDs

  • getOccupiedRoomIDs(): string[] | null
  • Returns string[] | null

getPing

  • getPing(): number | null
  • Returns number | null

getTimeOnline

  • getTimeOnline(): number | null
  • Returns number | null

init

  • init(): void
  • An initialization method invoked when this CustomClient object is ready for use. Subclasses wishing to perform initialization tasks that require this CustomClient's composed Client object should override this method.

    Returns void

isAdmin

  • isAdmin(): boolean | null
  • Returns boolean | null

isInRoom

  • isInRoom(roomID: string): boolean | null
  • Parameters

    • roomID: string

    Returns boolean | null

isObservingRoom

  • isObservingRoom(roomID: string): boolean | null
  • Parameters

    • roomID: string

    Returns boolean | null

isSelf

  • isSelf(): boolean | null
  • Returns boolean | null

kick

  • kick(): void
  • Returns void

observe

  • observe(): void
  • Returns void

removeEventListener

  • removeEventListener(type: string, listener: Function, thisObj: any): void
  • Parameters

    • type: string
    • listener: Function
    • thisObj: any

    Returns void

sendMessage

  • sendMessage(messageName: string, ...args: string[]): void
  • Parameters

    • messageName: string
    • Rest ...args: string[]

    Returns void

setAttribute

  • setAttribute(attrName: string, attrValue: string, attrScope?: undefined | string, isShared?: boolean, evaluate?: boolean): void
  • Parameters

    • attrName: string
    • attrValue: string
    • Optional attrScope: undefined | string
    • Default value isShared: boolean = true
    • Default value evaluate: boolean = false

    Returns void

setClientClass

  • setClientClass<T>(scope: string, clientClass: {}, ...fallbackClasses: {}[]): void
  • Type parameters

    • T

    Parameters

    • scope: string
    • clientClass: {}
    • Rest ...fallbackClasses: {}[]

    Returns void

stopObserving

  • stopObserving(): void
  • Returns void

toString

  • toString(): string
  • Returns string