Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConvergenceDomain

The ConvergenceDomain represents a single connection to a specific Convergence Domain. All interactions with the Domain can be achieve through the ConvergenceDomain API. The ConvergenceDomain provides several "services" that provide access to RealTimeModels, Users, Activities, Presence, and Chat.

Hierarchy

Index

Methods

activities

  • Gets the ActivityService, which is used for interacting with Activities.

    const activityService = domain.activities();

    Returns ActivityService

    The ActivityService from this ConvergenceDomain.

addListener

chat

  • Gets the ChatService, which is used to send and receive chat messages.

    example
    
    const chatService = domain.chat();

    Returns ChatService

    The ChatService for this ConvergenceDomain.

dispose

  • dispose(): Promise<void>
  • Disconnects from the server and releases all resources this domain is using. After calling dispose(), the domain will no longer be usable.

    example
    
    domain.dispose()
      .then(() => console.log("disposed!"))
      .catch(e => console.error(e));

    Returns Promise<void>

    A promise that is resolved when the ConvergenceDomain is disposed.

events

  • Provides the events emitted by this object as an Observable stream.

    example
    
    eventEmitter.events()
      .filter(e => e.name === "myevent")
      .subscribe(e => console.log(e));

    Returns Observable<IConvergenceDomainEvent>

    An Observable stream of all events emitted by this object.

id

  • id(): string
  • Returns string

    The ConvergenceSession object for this domain.

identity

  • Gets the IdentityService, which is used for obtaining information about domain users.

    const identityService = domain.identity();

    Returns IdentityService

    The IdentityService for this ConvergenceDomain.

isDisposed

  • isDisposed(): boolean
  • Determines if this domain is disposed.

    Returns boolean

    True if the domain is disposed; false otherwise.

models

  • Gets the ModelService, which is used for interacting with Real Time Models

    const modelService = domain.models();

    Returns ModelService

    The ModelService for this ConvergenceDomain.

namespace

  • namespace(): string
  • Returns string

    The ConvergenceSession object for this domain.

off

on

once

presence

  • Gets the PresenceService, which is used to gain insight into the presence of Domain Users.

    example
    
    const presenceService = domain.presence();

    Returns PresenceService

    The PresenceService for this ConvergenceDomain.

removeAllListeners

removeListener

removeListeners

session

Object literals

Static Events

Events: object

CONNECTED

CONNECTED: string = ConnectedEvent.NAME

DISCONNECTED

DISCONNECTED: string = DisconnectedEvent.NAME

ERROR

ERROR: string = ConnectionErrorEvent.NAME

INTERRUPTED

INTERRUPTED: string = InterruptedEvent.NAME

RECONNECTED

RECONNECTED: string = ReconnectedEvent.NAME