transferum
    Preparing search index...

    Class PollingProxyTransfer<T>

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

    Capabilities: isInput, isOutput, isPollingSource, isPollingProxy, isPullable, isSubscribable, isTriggerable, isGate

    Mechanics:

    1. The constructor accepts config (interval, activated), but NOT a fetcher
    2. setFetcher(fetcher) — sets the fetcher from the previous transfer, creates a Ticker via tickerFactory, starts polling if active
    3. clearFetcher() — stops the Ticker, clears the fetcher
    4. trigger() — calls fetcher(), notifies subscribers (if active)
    5. pull() — calls fetcher() directly (if active and fetcher is set)
    6. activate()/deactivate()/toggle() — control polling and state
    7. destroy() — stops polling, clears the fetcher, unsubscribes subscribers

    Error handling:

    • If fetcher() throws an exception in trigger() or pull(), onError is called.
    • With onError provided, the exception is suppressed (polling continues).
    • Without onError, the exception is rethrown.
    • The 'Fetcher is not defined' error is always rethrown (this is not a fetcher runtime error).

    Difference from PollingSourceTransfer:

    • Fetcher is NOT set in the constructor, but via setFetcher()
    • Has isInput = true (duplex, can be an intermediate link)
    • pull()/trigger() without a fetcher throws an Error
    • pull()/trigger() without active — returns undefined / is ignored

    Configuration (PollingProxyTransferConfig):

    • interval: number — polling interval (ms)
    • activated: boolean — initial polling state
    • tickerFactory?: TickerFactory — custom ticker factory (default: RAFTicker.factory)
    • onError?: ErrorHandler — fetcher error handler

    Use cases:

    • Intermediate polling node in a transfer chain
    • Adapter between a pull-source and a subscribe-consumer
    • Periodic reading from a buffer with emission into a stream

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

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