Skip to content
Classcorev0.10.0

Subscriber

Abstract base class for handling application subscribers.

Provides type-safe access to subscribers data and the core framework instance. Extend this class to create custom subscriber handlers.

abstract class Subscriber<
    KeyOfSubscribers extends SubscriptionKey,
    TCore extends CoreBase
>

Member visibility

Filter class members by access level.

constructor

Instantiates the subscriber with event data and core.

Subscriber(data: AllSubscriptions[KeyOfSubscribers], core: TCore)
Parameter: data

The subscriber event data

Parameter: core

The core framework instance

Showing members with Protected visibility and higher.

Properties

Methods

KeyOfSubscribers

The specific subscriber type this handler processes

KeyOfSubscribers extends SubscriptionKey

TCore

The transport's Core

TCore extends CoreBase

core

protected readonly core: TCore

logger

protected readonly logger: Logger

execute()

Executes the subscriber handler logic.

public abstract execute(): Promise<void>