CRConfig

This class contains configuration properties and methods used by other classes. Subclasses may add and override properties and methods as needed.

Contstructor

CRConfig(appId)
Parameters
appId
String, required
Identifies a controller/responder pair within an IP domain

Properties

appId
String, readOnly
Identifies the current controller/responder pair served by the current IP domain
initiated by the constructor
stateUpdateCompleteDt
Number, readOnly, default = 500
Delay in millisecs to allow state updates to complete
serverInteractionCompleteDt
Number, readOnly, default = 1000
Delay in millisecs to allow state updates involving server interaction to complete
minCrEventDt
Number, readOnly, default = 1000
Minimum delay between ordinary crEvents
interactingMaxEventOutDt
Number, readOnly, default = 10 * 1000
Max time in millisecs between ping events (or other events) sent to the partnerClient in the interacting state
searchingMaxEventOutDt
Number, readOnly, default = 5 * 1000
Max time in millisecs between events sent to the partnerClient in the searching state
Gaps will be filled with ping events
partnerActiveMaxEventInDt
Number, readOnly, default = 20 * 1000
Max time in millisecs allowed between events received from a partnerClient before it is considered inactive
invalidClientIdRetryDt
Number, readOnly, default = 5 * 1000
Time in millisecs before attempting to retrieve a new clientId if the current one is invalid
eventSourceSendAliveDt
Number, readOnly, default = 20 * 1000
Time in millisecs between alive events sent to the eventsource eventsource resource
validClientIdRegExp
RegExp, readOnly, default = /^[0-9]{6}$/
Defines syntactically valid clientId strings
validCrEventTypeRegExp
RegExp, readOnly, default = /^[0-9A-Za-z]+$/
Defines syntactically valid eventType strings
validCrEventSubTypeRegExp
RegExp, readOnly, default = /^[0-9A-Za-z]*$/
Defines syntactically valid eventSubType strings
validEventParamRegExp
RegExp, readOnly, default = /^[^,]*$/
Defines syntactically valid eventParam strings
eventDataSplitChar
String, readOnly, default = ","
Defines the string used to separate data parameters

Methods

isValidClientId(clientId) → Boolean
Returns true if the clientId is syntactically correct
Parameters
clientId
String, required
A client id
isValidClientRole(clientRole) → Boolean
Returns true if the clientRole is syntactically correct
Parameters
clientRole
String, required
A client role
isValidAccessToken(accessToken) → Boolean
Returns true if the accessToken string is syntactically correct
Parameters
accessToken
String, required
An accessToken
isValidCrEventType(eventType) → Boolean
Returns true if the eventType string is syntactically correct
Parameters
eventType
String, required
A CREvent eventType
isValidCrEventSubType(subType) → Boolean
Returns true if the subType string is syntactically correct
Parameters
subType
String, required
A CREvent eventSubType