The ConnectionListener to be added.
Instructs this StreamLink instance to attempt to connect to the Liberator.
When a ConnectionListener has been registered with this StreamLink instance, the listener's methods are called when the status of the connection changes.
Creates a Channel
for the specified subject on the Liberator.
Use the returned channel to send and receive data as maps of name/value pairs.
the Liberator subject that will be used for this channel.
to receive data, status and error messages from the channel.
Optional JSON configuration attributes.
channel object that can be used to send and receive data as maps of name/value pairs.
Creates a subject in the Liberator.
The name of the subject to create.
The type of subject to create.
A listener that is called to provide information about the result of the "create subject" command.
Optional JSON configuration attributes.
Information about the 'create subject' command. If the commandParameters
made the command persistent, you can subsequently cancel this by calling the CommandSubscription
's unPersist()
method.
Creates a WebRequestParameters
object for the specified Liberator web module.
The returned WebRequestParameters
object contains the URL and HTTP post body that should be
used to access the required web module.
the name of the Liberator web module.
a map of named options that the web module accepts.
an object of type WebRequestParameters or null if the module is not available or the options are invalid.
Deletes a subject in the Liberator.
The name of the subject to delete.
A listener that is called to provide information about the result of the 'delete subject' command.
Instructs this StreamLink instance to disconnect from the Liberator.
Returns an array containing the last "log_buffer_size" log lines written by the current {StreamLink} instance. If log_buffer_size is not set or <= 0 then the log buffer is disabled and this method will always return an empty array
An array containing the last "log_buffer_size" log lines written by this instance, or an empty array if "log_buffer_size" is not set
Returns the StreamLink logger object. You can receive StreamLink log messages by adding your own LogListener to this object.
The StreamLink logger.
Gets the version of StreamLink JavaScript.
String The version number and build identifier for this version of the StreamLink library.
Informs StreamLink the network connection is available so can connect.
Informs StreamLink the network connection is unavailable so it will not try to connect.
Pauses StreamLink so it does not receive new updates from the Liberator. The KeyMaster session will be kept alive.
This method can be used as part of your applications lifecycle to conserve battery life and reduce data usage by not receiving data when your application is in the background.
Publishes data to a subject.
The subject to publish to.
The data, as key-value pairs, to be published to the subject.
A listener that receives notification of the publish command's success or failure.
Optional JSON configuration attributes.
Information about the 'publish' command. If the commandParameters
made the command persistent, you can subsequently cancel this by calling the CommandSubscription
's unPersist()
method.
Removes a previously added ConnectionListener from this StreamLink instance. After removal, no further callbacks are received by this ConnectionListener.
The ConnectionListener to be removed.
Re-establishes the connection to the Liberator to receive updates.
This method can be used as part of your applications lifecycle to conserve battery life and reduce data usage by not receiving data when your application is in the background.
Requests a single update from a subject.
The subject to subscribe to.
A listener that is called to provide information about the result of the subscription request, the subscribed data, and subsequent updates to that data.
Optional JSON configuration attributes.
Subscribes to a subject to receive updates.
The subject to subscribe to.
A listener that is called to provide information about the result of the subscription request, the subscribed data, and subsequent updates to that data.
Optional JSON configuration attributes.
Information about the subscription. You can unsubscribe (stop receiving updates)
from a subscription using the unsubscribe()
method on the returned Subscription
object.
Throttles all the currently subscribed subjects, reducing the number of updates that are sent every second.
For a fuller explanation of throttling, refer to the 'Throttling' section of the document StreamLink Overview.
The throttle command to apply.
A listener that is called to provide information about the result of the throttle command.
Optional JSON configuration attributes; for details, see the commandParameters
parameter of throttleSubject().
Information about the 'throttle' command. If the commandParameters
made the command persistent, you can subsequently cancel this by calling the CommandSubscription
's unPersist()
method.
Throttles the specified subject, reducing the number of updates that are sent every second.
For a fuller explanation of throttling, refer to the 'Throttling' section of the document StreamLink Overview.
The subject for which received data updates are to be throttled.
The Throttle command to apply.
A listener that is called to provide information about the result of the throttle command.
Optional JSON configuration attributes.
Information about the 'throttle' command. If the commandParameters
made the command persistent, you can subsequently cancel this by calling the CommandSubscription
's unPersist()
method.
Generated using TypeDoc
Adds a connection listener with this StreamLink instance. This
connectionListener
is called whenever a connection event occurs.