Class: sessionObj

.appObj. sessionObj

new sessionObj()

The primary method for interfacing with an EasyRTC session.

Members

<static> sessionObj.events

Expose all event functions

<static> sessionObj.util

Expose all utility functions

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.
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.
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.
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)

<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.

<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
Returns:
Field object
Type
Object

<static> sessionObj.getFieldValueSync(fieldName) → {*}

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
Returns:
Field value
Type
*

<static> sessionObj.setField(fieldName, fieldValue, fieldOption, next)

Sets session field value for a given field name.
Parameters:
Name Type Argument 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).
Documentation generated by JSDoc 3.6.11 on 2025-02-19T14:18:15+00:00