transferum
    Preparing search index...

    Class AsyncPollingSourceTransfer<T>

    Output transfer with asynchronous internal polling of a data source.

    Capabilities: isOutput, isPollingSource, isAsyncPullable, isSubscribable, isAsyncTriggerable, isGate

    Mechanics:

    1. The constructor accepts config.fetcher: AsyncDataFetcher
    2. An internal Ticker calls asyncTrigger() (fire-and-forget)
    3. asyncTrigger() — calls await fetcher(), writes the result, notifies subscribers
    4. asyncPull() — calls await fetcher() directly (without writing to state)
    5. The _polling flag prevents overlapping calls with a slow fetcher
    6. activate()/deactivate()/toggle() — control polling via the ticker

    Error handling:

    • If fetcher() throws an exception in asyncTrigger() or asyncPull(), onError is called.
    • With onError provided, the exception is suppressed (polling continues).
    • Without onError, the exception is rethrown from asyncPull()/asyncTrigger().
    • When the ticker fires asyncTrigger() without onError, the rejection is unhandled (visible in logs as unhandled promise rejection). To suppress — provide onError.

    Configuration (AsyncPollingSourceTransferConfig):

    • fetcher: AsyncDataFetcher — async data retrieval function
    • interval: number — polling interval (ms)
    • activated: boolean — initial polling state
    • tickerFactory?: TickerFactory — custom ticker factory
    • onError?: ErrorHandler — fetcher error handler

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

    Index
    _state: ProxyReference<T>
    isAsyncPollingProxy: boolean = false
    isAsyncPullable: true
    isAsyncPushable: boolean = false
    isAsyncTriggerable: true
    isDuplex: boolean = false
    isGate: true
    isInput: boolean = false
    isOutput: true
    isPollingProxy: boolean = false
    isPollingSource: true
    isPullable: boolean = false
    isPushable: boolean = false
    isSubscribable: true
    isTriggerable: boolean = false