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.
  • incomingInstantMessage InstatMessage - Triggered when an incoming instant message is received during an active session
  • 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)

Member Summary

Public Members
public

Method Summary

Public Methods
public

Return stack-reported network connectivity tests results

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

Create a standalone message to the given 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 a call manager instance

public

Retrieves an array with the underlying capabilities

public

Retrieves the chat manager

public

Retrieves a conference manager instance

public

Retrieve the contact manager.

public

Retrieves the file manager

public

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

public

Retrieves the group manager.

public

getLogger(name: string): Logger

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

public
this method was deprecated.

Retrieves the meeting manager.

public

Retrieves the meeting manager.

public

getPresenceManager(): PresenceManager

Retrieves the presence manager.

public

Get a list of remote sessions where user is currently logged in

public

Get session token

public

Retrieves the current status of this session.

public

Retrieves a support service instance

public

Retrieve the User

public

getUserManager(): UserManager

Retrieve a UserManager object

public

Retrieves and array with version information.

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 Members

public presenceManager: * source

Public Methods

public checkConnection(proto: String): Promise source

Return stack-reported network connectivity tests results

Params:

NameTypeAttributeDescription
proto String
  • optional
  • default: 'udp'

The transport protocol to test connectivity for, one of 'udp', 'tcp'.

Return:

Promise

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 createInstantMessage(to: String, text: String): InstantMessage source

Create a standalone message to the given recipient

Params:

NameTypeAttributeDescription
to String

User identifier of the recipient

text String

Message's body

Return:

InstantMessage

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 getCallManager(): CallManager source

Retrieves a call manager instance

Return:

CallManager

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 getContactManager(): ContactManager source

Retrieve the contact manager.

Return:

ContactManager

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 getGroupManager(): Promise<GroupManager> source

Retrieves the group manager.

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 getMeetingList(): MeetingManager source

this method was deprecated.

Retrieves the meeting manager.

Return:

MeetingManager

public getMeetingManager(): MeetingManager source

Retrieves the meeting manager.

Return:

MeetingManager

public getPresenceManager(): PresenceManager source

Retrieves the presence manager.

Return:

PresenceManager

public getRemoteSessions(): Promise<Array<RemoteSession>> source

Get a list of remote sessions where user is currently logged in

public getSessionToken(): String source

Get session token

Return:

String

public getStatus(): SessionStatus source

Retrieves the current status of this session.

Return:

SessionStatus

public getSupportService(): SupportService source

Retrieves a support service instance

Return:

SupportService

public getUser(): User source

Retrieve the User

Return:

User

public getUserManager(): UserManager source

Retrieve a UserManager object

Return:

UserManager

public getVersion(): Object[] source

Retrieves and array with version information.

Return:

Object[]

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