RealtimeClient
Managing real time events
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object): Promise<JexiaClient, Error> Create a new RealTimeClient object with some initial values. |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
Attach responsible event handlers |
|
public |
getEventWithoutNamespace(event: string): string get event name without namespace |
|
public |
onSubscription(data: Object) Responsible for handling a new subscription |
|
public |
Responsible for handling a new token |
|
public |
Set the current token |
Public Constructors
public constructor(options: Object): Promise<JexiaClient, Error> source
Create a new RealTimeClient object with some initial values.
Public Members
Public Methods
public attachEventHandlers() source
Attach responsible event handlers
Listen:
jexia.auth.token |
New token |
jexia.dataset.subscription |
New dataset subsciption |
public getEventWithoutNamespace(event: string): string source
get event name without namespace
Params:
Name | Type | Attribute | Description |
event | string | Event with namespace attached |
public onSubscription(data: Object) source
Responsible for handling a new subscription
Params:
Name | Type | Attribute | Description |
data | Object | Subscription response |