Class
caplin.sljsadapter.providers

StreamLinkSubscription

The StreamLinkSubscription class provides a StreamLinkJS transport implementation of the caplin.services.messaging.Subscription interface.

Constructor Summary

Attributes Name and Description
caplin.sljsadapter.providers.StreamLinkSubscription(caplin.streamlink.StreamLink oStreamLink, String sSubject, caplin.streamlink.SubscriptionListener oListener, Map mSubscriptionParameters)

Method Summary

Attributes Name and Description
void dispose()

Permanently stops the subscription from receiving new updates to the subject.

String getSubject()

Returns the subject that this subscription is subscribed to.

Boolean isPaused()

Returns whether the subscription is currently paused or not.

void pause()

Temporarily disables the subscription from receiving new updates to the subject.

void resume()

Re-enables the subscription, allowing it to receive any new updates to the subject.

Constructor Detail

caplin.sljsadapter.providers.StreamLinkSubscription(caplin.streamlink.StreamLink oStreamLink, String sSubject, caplin.streamlink.SubscriptionListener oListener, Map mSubscriptionParameters)

Parameters
caplin.streamlink.StreamLink oStreamLink The StreamLink that will provide the connection for this subscription.
String sSubject The data subject to which to subscribe. Required; non-empty.
caplin.streamlink.SubscriptionListener oListener The listener that will receive subscription events for this subscription.
Map mSubscriptionParameters A map of additional parameters for the subscription.
Throws
caplin.core.Error
if sSubject is undefined, null or empty

Method Detail

void dispose()

Permanently stops the subscription from receiving new updates to the subject. Should be called when there is no further need for this subscription.

Throws
caplin.core.Error
if the subscription has already been disposed of.

String getSubject()

Returns the subject that this subscription is subscribed to.

Returns
The subscribed subject.

Boolean isPaused()

Returns whether the subscription is currently paused or not.

Throws
caplin.core.Error
if the subscription has been disposed of.

void pause()

Temporarily disables the subscription from receiving new updates to the subject.

Throws
caplin.core.Error
if the subscription has been disposed of.

void resume()

Re-enables the subscription, allowing it to receive any new updates to the subject.

Throws
caplin.core.Error
if the subscription has been disposed of.