Represents a subscription made with an implementation of
caplin.services.messaging.MessageService
.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.
- Implementations:
- module:caplin/services/testing/SubscriptionStub#dispose
- module:caplin/sl4badapter/providers/SL4BSubscription#dispose
- module:caplin/sljsadapter/providers/StreamLinkSubscription#dispose
Throws:
-
if the subscription has already been disposed of.
-
getSubject()
-
Returns the subject that this subscription is subscribed to.
- Implementations:
- module:caplin/services/testing/SubscriptionStub#getSubject
- module:caplin/sl4badapter/providers/SL4BSubscription#getSubject
- module:caplin/sljsadapter/providers/StreamLinkSubscription#getSubject
-
isDisposed()
-
Checks whether the subscription has been disposed.
Returns:
true if the subscription is disposed, otherwise false -
isPaused()
-
Returns whether the subscription is currently paused or not.
- Implementations:
- module:caplin/services/testing/SubscriptionStub#isPaused
- module:caplin/sl4badapter/providers/SL4BSubscription#isPaused
- module:caplin/sljsadapter/providers/StreamLinkSubscription#isPaused
Throws:
-
if the subscription has been disposed of.
-
pause()
-
Temporarily disables the subscription from receiving new updates to the subject.
- Implementations:
- module:caplin/services/testing/SubscriptionStub#pause
- module:caplin/sl4badapter/providers/SL4BSubscription#pause
- module:caplin/sljsadapter/providers/StreamLinkSubscription#pause
Throws:
-
if the subscription has been disposed of.
-
resume()
-
Re-enables the subscription, allowing it to receive any new updates to the subject.
- Implementations:
- module:caplin/services/testing/SubscriptionStub#resume
- module:caplin/sl4badapter/providers/SL4BSubscription#resume
- module:caplin/sljsadapter/providers/StreamLinkSubscription#resume
Throws:
-
if the subscription has been disposed of.