Ice.LocatorPrx

class Ice.LocatorPrx

Bases: ObjectPrx

Client applications use the Locator object to resolve Ice indirect proxies. This object also allows server applications to retrieve a proxy to the associated Ice.LocatorRegistryPrx object where they can register their object adapters.

Notes

The Slice compiler generated this proxy class from Slice interface ::Ice::Locator.

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) LocatorPrx | 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[LocatorPrx | 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

findAdapterById(id: str, context: dict[str, str] | None = None) ObjectPrx | None

Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter’s endpoint(s).

Parameters:
  • id (str) – The adapter ID.

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

Returns:

A dummy proxy with the adapter’s endpoints, or null if an object adapter with id was not found.

Return type:

ObjectPrx | None

Raises:

AdapterNotFoundException – Thrown when an object adapter with this adapter ID was not found. The caller should treat this exception like a null return value.

findAdapterByIdAsync(id: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None]

Finds an object adapter by adapter ID and returns a dummy proxy with the object adapter’s endpoint(s).

Parameters:
  • id (str) – The adapter ID.

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

Returns:

A dummy proxy with the adapter’s endpoints, or null if an object adapter with id was not found.

Return type:

Awaitable[ObjectPrx | None]

findObjectById(id: Identity, context: dict[str, str] | None = None) ObjectPrx | None

Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this object. This dummy proxy may be an indirect proxy that requires further resolution using Ice.LocatorPrx.findAdapterByIdAsync().

Parameters:
  • id (Identity) – The identity.

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

Returns:

A dummy proxy, or null if an object with the requested identity was not found.

Return type:

ObjectPrx | None

Raises:

ObjectNotFoundException – Thrown when an object with the requested identity was not found. The caller should treat this exception like a null return value.

findObjectByIdAsync(id: Identity, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None]

Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this object. This dummy proxy may be an indirect proxy that requires further resolution using Ice.LocatorPrx.findAdapterByIdAsync().

Parameters:
  • id (Identity) – The identity.

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

Returns:

A dummy proxy, or null if an object with the requested identity was not found.

Return type:

Awaitable[ObjectPrx | None]

getRegistry(context: dict[str, str] | None = None) LocatorRegistryPrx | None

Gets a proxy to the locator registry.

Parameters:

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

Returns:

A proxy to the locator registry, or null if this locator has no associated registry.

Return type:

LocatorRegistryPrx | None

getRegistryAsync(context: dict[str, str] | None = None) Awaitable[LocatorRegistryPrx | None]

Gets a proxy to the locator registry.

Parameters:

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

Returns:

A proxy to the locator registry, or null if this locator has no associated registry.

Return type:

Awaitable[LocatorRegistryPrx | 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) LocatorPrx
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