Constructor
new module:ct-sljsadapter /providers /Stream Link Subscription(stream Link, subject, listener, subscription Parameters)
Parameters:
Name | Type | Description |
---|---|---|
streamLink |
caplin |
The StreamLink that will provide the connection for this subscription. |
subject |
String | The data subject to which to subscribe. Required; non-empty. |
listener |
caplin |
The listener that will receive subscription events for this subscription. |
subscriptionParameters |
Map | A map of additional parameters for the subscription. |
- Implements:
Throws:
-
if subject is undefined, null or empty
- Type
-
module:br
/Errors .Invalid Parameters Error
Methods
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:
-
if the subscription has already been disposed of.
- Type
-
module:br
/Errors .Illegal State Error
get Subject()
Returns the subject that this subscription is subscribed to.
Returns:
The subscribed subject.
is Disposed()
Checks whether the subscription has been disposed.
Returns:
true if the subscription is disposed, otherwise false
is Paused()
Returns whether the subscription is currently paused or not.
Throws:
-
if the subscription has been disposed of.
- Type
-
module:br
/Errors .Illegal State Error
pause()
Temporarily disables the subscription from receiving new updates to the subject.
- Implements:
Throws:
-
if the subscription has been disposed of.
- Type
-
module:br
/Errors .Illegal State Error
resume()
Re-enables the subscription, allowing it to receive any new updates to the subject.
- Implements:
Throws:
-
if the subscription has been disposed of.
- Type
-
module:br
/Errors .Illegal State Error