Ice.RouterPrx

class Ice.RouterPrx

Bases: ObjectPrx

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 proxy class from Slice interface ::Ice::Router.

addProxies(proxies: Sequence[ObjectPrx | None], context: dict[str, str] | None = None) list[ObjectPrx | None]

Adds new proxy information to the router’s routing table.

Parameters:
  • proxies (Sequence[ObjectPrx | None]) – The proxies to add. Adding a null proxy is an error.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

Proxies discarded by the router. These proxies are all non-null.

Return type:

list[ObjectPrx | None]

addProxiesAsync(proxies: Sequence[ObjectPrx | None], context: dict[str, str] | None = None) Awaitable[list[ObjectPrx | None]]

Adds new proxy information to the router’s routing table.

Parameters:
  • proxies (Sequence[ObjectPrx | None]) – The proxies to add. Adding a null proxy is an error.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

Proxies discarded by the router. These proxies are all non-null.

Return type:

Awaitable[list[ObjectPrx | None]]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) RouterPrx | None

Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[RouterPrx | None]

Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

getClientProxy(context: dict[str, str] | None = None) 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:

context (dict[str, str]) – The request context for the invocation.

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 call Ice.RouterPrx.addProxiesAsync() to populate the routing table. The Ice runtime assumes the router has a routing table when hasRoutingTable is not set.

Return type:

tuple[ObjectPrx | None, bool | None]

Notes

Introduced in Ice 3.7.

getClientProxyAsync(context: dict[str, str] | None = 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:

context (dict[str, str]) – The request context for the invocation.

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 call Ice.RouterPrx.addProxiesAsync() to populate the routing table. The Ice runtime assumes the router has a routing table when hasRoutingTable is not set.

Return type:

Awaitable[tuple[ObjectPrx | None, bool | None]]

Notes

Introduced in Ice 3.7.

getServerProxy(context: dict[str, str] | None = None) 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:

context (dict[str, str]) – The request context for the invocation.

Returns:

The router’s server proxy.

Return type:

ObjectPrx | None

getServerProxyAsync(context: dict[str, str] | None = 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:

context (dict[str, str]) – The request context for the invocation.

Returns:

The router’s server proxy.

Return type:

Awaitable[ObjectPrx | None]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx, facet: str | None = None) RouterPrx
static uncheckedCast(proxy: None, facet: str | None = None) None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None