Skip to main content
Version: v1

Class: SubscriptionService

Constructors#

constructor#

• new SubscriptionService()

Defined in#

src/service/subscription.ts:26

Properties#

_subscribers#

â–ª Static Private _subscribers: Subscribers = []

Defined in#

src/service/subscription.ts:20


defaultSubscriberOptions#

â–ª Static defaultSubscriberOptions: SubscriberOptions

Defined in#

src/service/subscription.ts:22


instance#

â–ª Static instance: SubscriptionService

Defined in#

src/service/subscription.ts:24


subscribers#

â–ª Static subscribers: (typeof Subscriber | typeof default | SubscriberObject)[] = []

Defined in#

src/service/subscription.ts:15

Methods#

checkExistence#

â–¸ Protected checkExistence(object, property): void

Parameters#

NameType
objectany
propertystring

Returns#

void

Defined in#

src/service/subscription.ts:30


closeAll#

â–¸ Static closeAll(): Promise<void>

Call this function from a process exit handler to close all current subscriptions

Returns#

Promise<void>

Defined in#

src/service/subscription.ts:59


getSubscribers#

â–¸ Static getSubscribers(): Subscribers

Returns#

Subscribers

Defined in#

src/service/subscription.ts:63


handleError#

â–¸ Static handleError(error): void

If passed, it would serve as the default error handler at SubscriptionService level Applications should override this with custom error handling

Parameters#

NameType
errorError

Returns#

void

Defined in#

src/service/subscription.ts:49


init#

â–¸ Static init(): Promise<void>

Returns#

Promise<void>

Defined in#

src/service/subscription.ts:41


loadSubscribers#

â–¸ Static Private loadSubscribers(): Subscribers

Returns#

Subscribers

Defined in#

src/service/subscription.ts:72


loadSubscriptionService#

â–¸ Static loadSubscriptionService(): typeof SubscriptionService

Returns#

typeof SubscriptionService

Defined in#

src/service/subscription.ts:112


mergeSubscribers#

â–¸ Static Private mergeSubscribers(subscribersFromService, subscribersFromDirectory): Subscribers

Parameters#

NameType
subscribersFromServiceSubscribers
subscribersFromDirectorySubscribers

Returns#

Subscribers

Defined in#

src/service/subscription.ts:95