Interface DispatchNamespace

All Superinterfaces:
org.teavm.jso.JSObject

public interface DispatchNamespace extends org.teavm.jso.JSObject
A Workers for Platforms dispatch namespace. Declared with dispatch(), named DISPATCH by default.

Reaches a user Worker in the namespace by name, so one Worker can route to many.

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String name)
    Gets a handle on a user Worker.
    get(String name, TSObject args, TSObject options)
    Gets a handle on a user Worker, with arguments and limits.

    Methods inherited from interface org.teavm.jso.JSObject

    cast
  • Method Details

    • get

      Fetcher get(String name)
      Gets a handle on a user Worker. Does not check that it exists; a missing one fails on use.
      Parameters:
      name - the Worker's name in the namespace
      Returns:
      something to send requests to
    • get

      Fetcher get(String name, TSObject args, TSObject options)
      Gets a handle on a user Worker, with arguments and limits.
      Parameters:
      name - the Worker's name
      args - passed to the user Worker
      options - limits, outbound
      Returns:
      something to send requests to