SmartClient
Extends:
Example:
// Create a new WeakClient
const client = new ZetaPush.SmartClient({
sandboxId: '<YOUR-SANDBOX-ID>'
})
Constructor Summary
Public Constructor | ||
public |
constructor(config: SmartClientConfig) Create a new ZetaPush SmartClient |
Method Summary
Public Methods | ||
public |
Disconnect client from ZetaPush backend |
|
public |
|
|
public |
getSession(): Object |
|
public |
|
|
public |
isStronglyAuthenticated(session: *): boolean |
|
public |
isWeaklyAuthenticated(session: *): boolean |
|
public |
setCredentials(parameters: {login: string, password: string}) |
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: SmartClientConfig) source
Create a new ZetaPush SmartClient
Override:
Client#constructorParams:
Name | Type | Attribute | Description |
config | SmartClientConfig |