Home Reference Source
import {Session} from '@quobis/sippojs'
public class | source

Session

Extends:

src/eventemitter.js~EventEmitter → Session

Session objects manage communications for a given user identity. They are obtained by calling the Sippo#createSession method of the Sippo object.

Events

  • status StatusEvent - Triggered every time the status of the session changes.
  • incomingDataPipe Datapipe - Triggered when an incoming data pipe is received during an active session
  • incomingWhiteboard Whiteboard -
  • incomingSelfie Selfie - Triggered when an Selfie request is received
  • qs-connection-lost - Triggered when the socket.io ping times out (deprecated)
  • qs-transport-close - Triggered when the socket is terminated (deprecated)
  • qs-unknown-close - Triggered when some other reason closed the socket (deprecated)

Method Summary

Public Methods
public

async connect(): Promise<Session>

Activates the communications session with a gateway server.

public

createDataPipe(participants: String[], label: String): DataPipe

Creates a new data pipe instance for data exchange with the specified recipient.

public

Creates a new instance of a Selfie

public

createWhiteboard(participants: String[]): Promise{Whiteboard}

Creates a new instance of a Whiteboard

public

Destroy every existent token for the deviceId of this session

public

async disconnect(): Promise

Ends a connected session.

public

Get user's alias

public

Retrieves an array with the underlying capabilities

public

Retrieves the chat manager

public

Retrieves a conference manager instance

public

Returns the contact repository.

public

Retrieves the file manager

public

Returns the username in the gateway of the user owning this session

public

Retrieves the group repository.

public

getLogger(name: string): Logger

Retrieves a {Logger} instance to log events in the WAC.

public

Retrieves the meeting manager.

public

Retrieves the permissions manager.

public
public

Get session token

public

Retrieves the current status of this session.

public

Retrieve the User

public

getUserRepository(): UserRepository

Returns the user repository.

public

Retrieves and array with version information.

public

getVoiceMailManager(): VoiceMailMananger

Retrieves the voicemail manager

public

notifyPushToken(tokenType: string, token: string): Promise

Notifies a push token to the WAC

public

Resume current session, restoring WAC communication

public

setSetting(key: String, value: String): Session

public

Retrieves a promise which is resolved with the settings array.

public

Suspend current session: WAC will not send or receive any message

Public Methods

public async connect(): Promise<Session> source

Activates the communications session with a gateway server.

Return:

Promise<Session>

Resolved after the session is connected or rejected if an error occurs during connection

public createDataPipe(participants: String[], label: String): DataPipe source

Creates a new data pipe instance for data exchange with the specified recipient.

Params:

NameTypeAttributeDescription
participants String[]

gateway usernames of the desired participants

label String

a shared pipe identifier.

Return:

DataPipe

Throw:

TypeError

public createSelfie(to: String): Promise source

Creates a new instance of a Selfie

Params:

NameTypeAttributeDescription
to String

gateway username of the selfie recipient.

Return:

Promise

public createWhiteboard(participants: String[]): Promise{Whiteboard} source

Creates a new instance of a Whiteboard

Params:

NameTypeAttributeDescription
participants String[]

gateway usernames of the desired participants

Return:

Promise{Whiteboard}

public destroyPushToken(): Promise source

Destroy every existent token for the deviceId of this session

Return:

Promise

public async disconnect(): Promise source

Ends a connected session.

Return:

Promise

A promise that is fulfilled when the session is disconnected

public getAlias(): String source

Get user's alias

Return:

String

User's alias

public getCapabilities(): ImmutableSet<string> source

Retrieves an array with the underlying capabilities

Return:

ImmutableSet<string>

public async getChatManager(): Promise<ChatManager> source

Retrieves the chat manager

Return:

Promise<ChatManager>

public getConferenceManager(): ConferenceManager source

Retrieves a conference manager instance

public getContactRepository(): ContactRepository source

Returns the contact repository.

public async getFileManager(): Promise<FileManager> source

Retrieves the file manager

Return:

Promise<FileManager>

public getGatewayUsername(): String source

Returns the username in the gateway of the user owning this session

Return:

String

The users's gateway username

public getGroupRepository(): Promise<GroupRepository> source

Retrieves the group repository.

public getLogger(name: string): Logger source

Retrieves a {Logger} instance to log events in the WAC.

Params:

NameTypeAttributeDescription
name string

The name of the logger

Return:

Logger

public getMeetingManager(): MeetingManager source

Retrieves the meeting manager.

Return:

MeetingManager

public getPermissionManager(): PermissionManager source

Retrieves the permissions manager.

public getPresence(): * source

Return:

*

public getSessionToken(): String source

Get session token

Return:

String

public getStatus(): SessionStatus source

Retrieves the current status of this session.

Return:

SessionStatus

public getUser(): User source

Retrieve the User

Return:

User

public getUserRepository(): UserRepository source

Returns the user repository.

Return:

UserRepository

public getVersion(): Object[] source

Retrieves and array with version information.

Return:

Object[]

public getVoiceMailManager(): VoiceMailMananger source

Retrieves the voicemail manager

Return:

VoiceMailMananger

public notifyPushToken(tokenType: string, token: string): Promise source

Notifies a push token to the WAC

Params:

NameTypeAttributeDescription
tokenType string

type of the token. Supported values are "apn" and "firebase"

token string

token intended to be used to send notifications

Return:

Promise

public resume(): Promise source

Resume current session, restoring WAC communication

Return:

Promise

Resolved when the session is resumed

public setSetting(key: String, value: String): Session source

Params:

NameTypeAttributeDescription
key String

Key to modified

value String

New value

Return:

Session

public settings(): Promise source

Retrieves a promise which is resolved with the settings array.

Return:

Promise

This promise is resolved with a settings array

public suspend(): Promise source

Suspend current session: WAC will not send or receive any message

Return:

Promise

Resolved when the session is suspended