Ice.Router¶
- class Ice.Router¶
-
Represents an intermediary object that routes requests and replies between clients and Ice objects that are not directly reachable from these clients.
Notes
The Slice compiler generated this skeleton class from Slice interface
::Ice::Router.- abstractmethod addProxies(proxies: list[ObjectPrx | None], current: Current) Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]¶
Adds new proxy information to the router’s routing table.
- Parameters:
proxies (list[ObjectPrx | None]) – The proxies to add. Adding a null proxy is an error.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
Proxies discarded by the router. These proxies are all non-null.
- Return type:
Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]
- abstractmethod getClientProxy(current: Current) tuple[ObjectPrx | None, bool | None] | Awaitable[tuple[ObjectPrx | None, bool | None]]¶
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 (Ice.Current) – The Current object for the dispatch.
- Returns:
- A tuple containing:
ObjectPrx | None The router’s client proxy.
bool | None Indicates whether or not the router supports a routing table. If
true, the Ice runtime will callIce.RouterPrx.addProxiesAsync()to populate the routing table. The Ice runtime assumes the router has a routing table whenhasRoutingTableis not set.
- Return type:
tuple[ObjectPrx | None, bool | None] | Awaitable[tuple[ObjectPrx | None, bool | None]]
Notes
Introduced in Ice 3.7.
- abstractmethod getServerProxy(current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]¶
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 (Ice.Current) – The Current object for the dispatch.
- Returns:
The router’s server proxy.
- Return type: