transferum
    Preparing search index...

    Class AsyncPollingProxyTransfer<T>

    Duplex transfer with asynchronous polling that receives its fetcher from the previous node.

    Capabilities: isInput, isOutput, isDuplex, isAsyncPollingProxy, isPollingSource, isAsyncPullable, isSubscribable, isAsyncTriggerable, isGate

    Mechanics:

    1. The constructor accepts config (interval, activated), but NOT a fetcher
    2. setAsyncFetcher(fetcher) — sets the async fetcher, creates a Ticker, starts if active
    3. clearAsyncFetcher() — stops the Ticker, clears the fetcher
    4. asyncTrigger() — calls await fetcher(), notifies subscribers (if active)
    5. asyncPull() — calls await fetcher() directly (if active and fetcher is set)
    6. The _polling flag prevents overlapping
    7. activate()/deactivate()/toggle() — control polling

    Error handling:

    • If fetcher() throws an exception, onError is called.
    • With onError provided, the exception is suppressed. Without onError — rethrown.
    • The 'Async fetcher is not defined' error is always rethrown.
    • When the ticker fires asyncTrigger() without onError, the rejection is unhandled (visible in logs as unhandled promise rejection). To suppress — provide onError.

    Configuration (AsyncPollingProxyTransferConfig):

    • interval: number — polling interval (ms)
    • activated: boolean — initial polling state
    • tickerFactory?: TickerFactory
    • onError?: ErrorHandler

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

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