IceGrid.QueryPrx

class IceGrid.QueryPrx

Bases: ObjectPrx

Finds well-known Ice objects registered with the IceGrid registry.

Notes

The Slice compiler generated this proxy class from Slice interface ::IceGrid::Query.

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

findAllObjectsByType(type: str, context: dict[str, str] | None = None) list[ObjectPrx | None]

Finds all the well-known objects with the given type.

Parameters:
  • type (str) – The object type.

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

Returns:

A list of proxies to the well-known objects with the specified type. Can be empty.

Return type:

list[ObjectPrx | None]

findAllObjectsByTypeAsync(type: str, context: dict[str, str] | None = None) Awaitable[list[ObjectPrx | None]]

Finds all the well-known objects with the given type.

Parameters:
  • type (str) – The object type.

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

Returns:

A list of proxies to the well-known objects with the specified type. Can be empty.

Return type:

Awaitable[list[ObjectPrx | None]]

findAllReplicas(proxy: ObjectPrx | None, context: dict[str, str] | None = None) list[ObjectPrx | None]

Finds all the replicas of a well-known object.

Parameters:
  • proxy (ObjectPrx | None) – A proxy that identifies the well-known object.

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

Returns:

A list of proxies to the replicas of the well-known object specified by proxy. Can be empty.

Return type:

list[ObjectPrx | None]

findAllReplicasAsync(proxy: ObjectPrx | None, context: dict[str, str] | None = None) Awaitable[list[ObjectPrx | None]]

Finds all the replicas of a well-known object.

Parameters:
  • proxy (ObjectPrx | None) – A proxy that identifies the well-known object.

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

Returns:

A list of proxies to the replicas of the well-known object specified by proxy. Can be empty.

Return type:

Awaitable[list[ObjectPrx | None]]

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

Finds a well-known object by identity.

Parameters:
  • id (Identity) – The identity.

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

Returns:

A proxy to the well-known object, or null if no such object is registered.

Return type:

ObjectPrx | None

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

Finds a well-known object by identity.

Parameters:
  • id (Identity) – The identity.

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

Returns:

A proxy to the well-known object, or null if no such object is registered.

Return type:

Awaitable[ObjectPrx | None]

findObjectByType(type: str, context: dict[str, str] | None = None) ObjectPrx | None

Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.

Parameters:
  • type (str) – The object type.

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

Returns:

A proxy to a well-known object with the specified type, or null if no such object is registered.

Return type:

ObjectPrx | None

findObjectByTypeAsync(type: str, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None]

Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.

Parameters:
  • type (str) – The object type.

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

Returns:

A proxy to a well-known object with the specified type, or null if no such object is registered.

Return type:

Awaitable[ObjectPrx | None]

findObjectByTypeOnLeastLoadedNode(type: str, sample: LoadSample, context: dict[str, str] | None = None) ObjectPrx | None

Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.

Parameters:
  • type (str) – The object type.

  • sample (LoadSample) – The sampling interval.

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

Returns:

A proxy to the well-known object, or null if no such object is registered.

Return type:

ObjectPrx | None

findObjectByTypeOnLeastLoadedNodeAsync(type: str, sample: LoadSample, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None]

Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.

Parameters:
  • type (str) – The object type.

  • sample (LoadSample) – The sampling interval.

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

Returns:

A proxy to the well-known object, or null if no such object is registered.

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) QueryPrx
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