Constructor
new Core(cfg)
Arguments:
-
cfgProperties
-
host(string) Server host -
[path](string) API path - the same as in Server confighttpServer.path -
onCredentialRequired Callback for requesting a user creadentials. SeeUBConnectionconstructorrequestAuthParamsparameter description -
[onAuthorizationFail] Callback for authorization failure. SeeauthorizationFailevent. -
[onNeedChangePassword] Callback for a password exparition. SeepasswordExpiredevent -
[onGotApplicationConfig] -
[onGotApplicationDomain]
-
- Mixes In:
Members
connection: UBConnection
Connection to the server
ubNotifier: UBNotifierWSProtocol
WebSocket ubNotifier protocol instance
appConfig: Object
Application settings transferred form a server
preferredLocale: string
The preferred (used in previous user session if any or a default for application) locale
domain: UBDomain
The application domain
Methods
initialize() → Promise
Initialize a Core. Return a promise, resolved to {Core} instance
listenerCount(emitter, type) → Number
Return the number of listeners for a given event.
Arguments:
-
emitter (EventEmitter)
-
type (String)
- Mixes In:
ubNotifier protocol instance
initialize() → Promise
Initialize a Core. Return a promise, resolved to {Core} instance
listenerCount(emitter, type) → Number
Return the number of listeners for a given event.
Arguments:
-
emitter(EventEmitter) -
type(String)
- Mixes In: