Interface WorkerConfig<TReceive>


@JsType(isNative=true, name="ng.WorkerConfig", namespace="<global>") public interface WorkerConfig<TReceive>
Public AngularTS WorkerConfig contract exposed through the global ng namespace for Closure-annotated applications.
  • Method Details

    • create

      @JsOverlay static <TReceive> WorkerConfig<TReceive> create()
    • getDecode

      @JsProperty WorkerConfig.DecodeCallback<TReceive> getDecode()
      Decode an inbound native message before delivering it to subscribers.
    • getMaxRestarts

      @JsProperty double getMaxRestarts()
      Maximum automatic restarts. Defaults to 3.
    • getRestartDelay

      @JsProperty double getRestartDelay()
      Base restart delay. Exponential backoff is capped at 30s.
    • isRestart

      @JsProperty boolean isRestart()
      Restart the worker after a native runtime error. Automatic restart is disabled by default.
    • setDecode

      @JsProperty void setDecode(WorkerConfig.DecodeCallback<TReceive> decode)
      Decode an inbound native message before delivering it to subscribers.
    • setMaxRestarts

      @JsProperty void setMaxRestarts(double maxRestarts)
      Maximum automatic restarts. Defaults to 3.
    • setRestart

      @JsProperty void setRestart(boolean restart)
      Restart the worker after a native runtime error. Automatic restart is disabled by default.
    • setRestartDelay

      @JsProperty void setRestartDelay(double restartDelay)
      Base restart delay. Exponential backoff is capped at 30s.