WeakClient
Extends:
Example:
// Create a new WeakClient
const client = new ZetaPush.WeakClient({
sandboxId: '<YOUR-SANDBOX-ID>'
})
// Explicit deploymentId
// WeakClient provide optional deployment id, according to the following convention `${ServiceType.toLowerCase()_0}`
// deploymentId default value is weak_0
const client = new ZetaPush.WeakClient({
deploymentId: 'weak_0',
sandboxId: '<YOUR-SANDBOX-ID>'
})
Constructor Summary
Public Constructor | ||
public |
constructor(config: WeakClientConfig) Create a new ZetaPush WeakClient |
Inherited Summary
From class Client | ||
public |
Add a connection listener to handle life cycle connection events |
|
public |
connect() Safely connect client to ZetaPush |
|
public |
createAsyncMacroService(parameters: {listener: Object, Type: class, deploymentId: string}): Object Create a promise based service instance |
|
public |
createService(parameters: {listener: Object, Type: class, deploymentId: string}): Object Create a publish/subscribe for a service type |
|
public |
Disonnect client from ZetaPush |
|
public |
Get the client resource |
|
public |
Get the client sandbox id |
|
public |
Get server urls list |
|
public |
Get the client user id |
|
public |
getUserInfo(): * |
|
public |
Is client connected to ZetaPush |
|
public |
removeConnectionStatusListener(handler: number): * Remove a connection status listener |
|
public |
setAuthentication(authentication: function(): AbstractHandshake) Set a new authentication methods |
|
public |
setLogLevel(level: string) Set logging level Valid values are the strings 'error', 'warn', 'info' and 'debug', from less verbose to more verbose. |
|
public |
setResource(resource: string) Set new client resource value |
|
public |
unsubscribe(service: Object): * Remove all subscriptions |
Public Constructors
public constructor(config: WeakClientConfig) source
Create a new ZetaPush WeakClient
Override:
Client#constructorParams:
Name | Type | Attribute | Description |
config | WeakClientConfig |