Caplin Trader 4.7.1

Interface: module:caplin/services/messaging/Subscription

module:caplin/services/messaging/Subscription

Represents a subscription made with an implementation of caplin.services.messaging.MessageService.
Implementations:

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:
Throws:
if the subscription has already been disposed of.
Type
module:caplin/core/Error

getSubject()

Returns the subject that this subscription is subscribed to.
Implementations:

isDisposed()

Checks whether the subscription has been disposed.
Implementations:
Returns:
true if the subscription is disposed, otherwise false

isPaused()

Returns whether the subscription is currently paused or not.
Implementations:
Throws:
if the subscription has been disposed of.
Type
module:caplin/core/Error

pause()

Temporarily disables the subscription from receiving new updates to the subject.
Implementations:
Throws:
if the subscription has been disposed of.
Type
module:caplin/core/Error

resume()

Re-enables the subscription, allowing it to receive any new updates to the subject.
Implementations:
Throws:
if the subscription has been disposed of.
Type
module:caplin/core/Error