Class: sessionObj

.appObj.sessionObj

new sessionObj()

The primary method for interfacing with an EasyRTC session.
Source:

Members

(static) sessionObj.events

Expose all event functions
Source:

(static) sessionObj.util

Expose all utility functions
Source:

Methods

(static) sessionObj.getApp() → {Object}

Returns the application object to which the session belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
Source:
Returns:
The application object
Type
Object

(static) sessionObj.getAppName() → {string}

Returns the application name for the application to which the session belongs. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
Source:
Returns:
The application name
Type
string

(static) sessionObj.getEasyrtcsid() → {string}

Returns the easyrtcsid for the session. Note that unlike most EasyRTC functions, this returns a value and does not use a callback.
Source:
Returns:
Returns the easyrtcsid, which is the EasyRTC unique identifier for a session.
Type
string

(static) sessionObj.getField(fieldName, callback)

Returns session level field object for a given field name to a provided callback.
Parameters:
Name Type Description
fieldName string Field name
callback function Callback with error and field value (any type)
Source:

(static) sessionObj.getFields(limitToIsShared, callback)

Returns an object containing all field names and values within the session to a provided callback. Can be limited to fields with isShared option set to true.
Parameters:
Name Type Description
limitToIsShared boolean Limits returned fields to those which have the isShared option set to true.
callback function Callback with error and object containing field names and values.
Source:

(static) sessionObj.getFieldSync(fieldName) → {Object}

Returns session level field object for a given field name. If the field is not set, it will return a field object will a null field value. This is a synchronous function, thus may not be available in custom cases where state is not kept in memory.
Parameters:
Name Type Description
fieldName string Field name
Source:
Returns:
Field object
Type
Object

(static) sessionObj.getFieldValueSync(fieldName) → (nullable) {*}

Returns session level field value for a given field name. If the field is not set, it will return a null field value. This is a synchronous function, thus may not be available in custom cases where state is not kept in memory.
Parameters:
Name Type Description
fieldName string Field name
Source:
Returns:
Field value
Type
*

(static) sessionObj.setField(fieldName, fieldValue, fieldOptionnullable, nextopt)

Sets session field value for a given field name.
Parameters:
Name Type Attributes Description
fieldName string Must be formatted according to "fieldNameRegExp" option.
fieldValue Object
fieldOption Object <nullable>
Field options (such as isShared which defaults to false)
next nextCallback <optional>
A success callback of form next(err). Possible err will be instanceof (ApplicationWarning).
Source: