Simulates a comet subscription to a streaming channel.

Hierarchy

  • EventEmitter
    • StreamingMockCometSubscription

Implements

Constructors

Properties

SUBSCRIPTION_COMPLETE: string = 'subscriptionComplete'
SUBSCRIPTION_FAILED: string = 'subscriptionFailed'

Methods

  • Sets up a streaming subscription callback to occur after the setTimeout event loop phase.

    Parameters

    • callback: (() => void)

      The function to invoke.

        • (): void
        • Returns void

    Returns void

  • Sets up a streaming subscription errback to occur after the setTimeout event loop phase.

    Parameters

    • callback: ((error) => void)

      The function to invoke.

        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns void