@zeroc/ice
    Preparing search index...

    Class RouterAbstract

    Represents an intermediary object that routes requests and replies between clients and Ice objects that are not directly reachable from these clients.

    Hierarchy (View Summary)

    Implemented by

    Index

    Constructors

    Methods

    • Adds new proxy information to the router's routing table.

      Parameters

      • proxies: ObjectPrx[]

        The proxies to add. Adding a null proxy is an error.

      • current: Current

        The Current object for the dispatch.

      Returns ObjectPrx[] | PromiseLike<ObjectPrx[]>

      A promise like object representing the result of the dispatch, which resolves to:

      • (Ice.ObjectPrx | null)[] : Proxies discarded by the router. These proxies are all non-null.
    • Dispatches an incoming request to one of the methods of this generated class, based on the operation name carried by the request.

      Parameters

      Returns OutgoingResponse | PromiseLike<OutgoingResponse>

      The outgoing response (when the selected method returns a value), or a promise with the outgoing response (when the selected method returns a promise).

      Ice marshals any exception thrown by this method into the response.

    • Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the router. If a null proxy is returned, the client will forward requests to the router's endpoints.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns [ObjectPrx, boolean] | PromiseLike<[ObjectPrx, boolean]>

      A promise like object representing the result of the dispatch, which resolves to an array with the following entries:

      • Ice.ObjectPrx | null : The router's client proxy.
      • boolean | undefined : Indicates whether or not the router supports a routing table. If true, the Ice runtime will call Ice.RouterPrx.addProxies to populate the routing table. The Ice runtime assumes the router has a routing table when hasRoutingTable is not set.

      Introduced in Ice 3.7.

    • Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object adapters.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns ObjectPrx | PromiseLike<ObjectPrx>

      A promise like object representing the result of the dispatch, which resolves to:

      • Ice.ObjectPrx | null : The router's server proxy.
    • Returns the Slice type ID of the most-derived interface supported by this object.

      Parameters

      • current: Current

        The Current object for the invocation.

      Returns string | PromiseLike<string>

      The Slice type ID of the most-derived interface.

    • Returns the Slice type IDs of the interfaces supported by this object.

      Parameters

      • current: Current

        The Current object for the invocation.

      Returns string[] | PromiseLike<string[]>

      The Slice type IDs of the interfaces supported by this object, in alphabetical order.

    • Tests whether this object supports a specific Slice interface.

      Parameters

      • typeID: string

        The type ID of the Slice interface to test against.

      • current: Current

        The Current object for the invocation.

      Returns boolean | PromiseLike<boolean>

      True if this object has the interface specified by typeID or derives from the interface specified by typeID.

    • Tests whether this object can be reached.

      Parameters

      • current: Current

        The Current object for the invocation.

      Returns void | PromiseLike<void>

    • Obtains the Slice type ID of this type.

      Returns string

      The return value is always "::Ice::Router".