diffusion
Version:
Diffusion JavaScript client
155 lines (135 loc) • 3.49 kB
JavaScript
var TransportType = require('../client/client-summary').TransportType;
var ClientType = require('../client/client-summary').ClientType;
var AddressType = require('../client/client-location').AddressType;
var DetailType = require('../client/session-details').DetailType;
var CloseReason = require('../client/close-reason');
/**
* @namespace diffusion.clients
*/
/**
* Enum containing standard session property keys
*
* @example
* // Get the ALL_FIXED_PROPERTIES key
* var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES;
*
* @example
* // Get all user and fixed properties
* var props = diffusion.clients.PropertyKeys.ALL_FIXED_PROPERTIES
* .concat(diffusion.clients.PropertyKeys.ALL_USER_PROPERTIES);
*
* @readonly
* @enum
* @memberOf diffusion.clients
* @alias PropertyKeys
*/
var GetSessionPropertiesKeys = {
/**
* This constant can be used instead of a property key in requests for
* session property values to indicate that <b>all</b> fixed session
* properties are required. */
ALL_FIXED_PROPERTIES: ['*F'],
/**
* This constant can be used instead of a property key in requests for
* session property values to indicate that <b>all</b> user defined session
* properties are required. */
ALL_USER_PROPERTIES: ['*U'],
/**
* This constant can be used instead of a property key in requests for
* session property values to indicate that <b>all</b> session
* properties are required. */
ALL_PROPERTIES: ['*F', '*U'],
/**
* Session property key for session identifier.
*
* @since 6.2
*/
SESSION_ID: "$SessionId",
/**
* Session property key for principal.
*
* @since 6.2
*/
PRINCIPAL: "$Principal",
/**
* Session property key for connector name.
*
* @since 6.2
*/
CONNECTOR: "$Connector",
/**
* Session property key for transport.
*
* @since 6.2
*/
TRANSPORT: "$Transport",
/**
* Session property key for client type.
*
* @since 6.2
*/
CLIENT_TYPE: "$ClientType",
/**
* Session property key for country code.
*
* @since 6.2
*/
COUNTRY: "$Country",
/**
* Session property key for language code.
*
* @since 6.2
*/
LANGUAGE: "$Language",
/**
* Session property key for server name.
*
* @since 6.2
*/
SERVER_NAME: "$ServerName",
/**
* Session property key for client IP address.
*
* @since 6.2
*/
CLIENT_IP: "$ClientIP",
/**
* Session property key for client latitude.
*
* @since 6.2
*/
LATITUDE: "$Latitude",
/**
* Session property key for client longitude.
*
* @since 6.2
*/
LONGITUDE: "$Longitude",
/**
* Session property key for client start time.
*
* @since 6.2
*/
START_TIME: "$StartTime",
/**
* Session property key for session roles.
*
* @since 6.2
*/
ROLES: "$Roles"
};
module.exports = {
PropertyKeys: GetSessionPropertiesKeys,
TransportType : TransportType,
AddressType : AddressType,
ClientType : ClientType,
DetailType : DetailType,
CloseReason : CloseReason,
/**
* Value returned by {@link Session#getPrincipal} if no principal name is
* associated with the session.
*
* @property {String} diffusion.clients.ANONYMOUS
*/
ANONYMOUS : ""
};