Ice.ObjectPrx

class Ice.ObjectPrx

Bases: ObjectPrx

The base class for all Ice proxies.

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

Creates a new proxy from an existing proxy.

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

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

Returns:

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

Return type:

ObjectPrx | None

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

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

Returns:

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

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[ObjectPrx | 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 | None, optional) – A facet name.

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

Returns:

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

Return type:

ObjectPrx | None

static ice_staticId() str

Returns the Slice type ID associated with this type.

Returns:

The Slice type ID.

Return type:

str

ice_getCommunicator() Communicator

Gets the communicator that created this proxy.

Returns:

The communicator that created this proxy.

Return type:

Communicator

ice_isA(id: str, context: dict[str, str] | None = None) bool

Tests whether this object supports a specific Slice interface.

Parameters:
  • id (str) – The type ID of the Slice interface to test against.

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

Returns:

True if the target object implements the Slice interface specified by id or implements a derived interface, False otherwise.

Return type:

bool

ice_isAAsync(id: str, context: dict[str, str] | None = None) Awaitable[bool]

Tests whether this object supports a specific Slice interface.

Parameters:
  • id (str) – The type ID of the Slice interface to test against.

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

Returns:

An Awaitable that completes when the invocation completes. It holds True if the target object implements the Slice interface specified by id or implements a derived interface, False otherwise.

Return type:

Awaitable[bool]

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

Tests whether the target object of this proxy can be reached.

Parameters:

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

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

Tests whether the target object of this proxy can be reached.

Parameters:

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

Returns:

An Awaitable that completes when the invocation completes.

Return type:

Awaitable[None]

ice_ids(context: dict[str, str] | None = None) list[str]

Returns the Slice interfaces supported by this object as a list of Slice type IDs.

Parameters:

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

Returns:

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

Return type:

list[str]

ice_idsAsync(context: dict[str, str] | None = None) Awaitable[list[str]]

Returns the Slice interfaces supported by this object as a list of Slice type IDs.

Parameters:

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

Returns:

An Awaitable that completes when the invocation completes. It holds the Slice type IDs of the interfaces supported by the target object, in alphabetical order.

Return type:

Awaitable[list[str]]

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

Returns the type ID of the most-derived Slice interface supported by this object.

Parameters:

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

Returns:

The Slice type ID of the most-derived interface.

Return type:

str

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

Returns the type ID of the most-derived Slice interface supported by this object.

Parameters:

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

Returns:

An Awaitable that completes when the invocation completes. It holds the Slice type ID of the most-derived interface.

Return type:

Awaitable[str]

ice_getIdentity() Identity

Gets the identity embedded in this proxy.

Returns:

The identity of the target object.

Return type:

Identity

ice_identity(newIdentity: Identity) Self

Creates a proxy that is identical to this proxy, except for the identity.

Parameters:

newIdentity (Identity) – The identity for the new proxy.

Returns:

A proxy with the new identity.

Return type:

Self

ice_getContext() dict[str, str] | None

Gets the per-proxy context for this proxy.

Returns:

The per-proxy context, or None if the proxy does not have a per-proxy context.

Return type:

dict[str, str] | None

ice_context(new_context: dict[str, str]) Self

Creates a proxy that is identical to this proxy, except for the per-proxy context.

Parameters:

new_context (dict[str, str]) – The context for the new proxy.

Returns:

A proxy with the new per-proxy context.

Return type:

Self

ice_getFacet() str

Gets the facet for this proxy.

Returns:

The facet for this proxy. If the proxy uses the default facet, the return value is the empty string.

Return type:

str

ice_facet(new_facet: str) Self

Creates a proxy that is identical to this proxy, except for the facet.

Parameters:

new_facet (str) – The facet for the new proxy.

Returns:

A proxy with the new facet.

Return type:

Self

ice_getAdapterId() str

Gets the adapter ID for this proxy.

Returns:

The adapter ID. If the proxy does not have an adapter ID, the return value is the empty string.

Return type:

str

ice_adapterId(newAdapterId: str) Self

Creates a proxy that is identical to this proxy, except for the adapter ID.

Parameters:

newAdapterId (str) – The adapter ID for the new proxy.

Returns:

A proxy with the new adapter ID.

Return type:

Self

ice_getEndpoints() tuple[Endpoint, ...]

Gets the endpoints used by this proxy.

Returns:

The endpoints used by this proxy.

Return type:

tuple[Ice.Endpoint, …]

ice_endpoints(newEndpoints: tuple[Endpoint, ...] | list[Endpoint]) Self

Creates a proxy that is identical to this proxy, except for the endpoints.

Parameters:

newEndpoints (tuple[Ice.Endpoint, ...] | list[Ice.Endpoint]) – The endpoints for the new proxy.

Returns:

A proxy with the new endpoints.

Return type:

Self

ice_getLocatorCacheTimeout() int

Gets the locator cache timeout of this proxy.

Returns:

The locator cache timeout value (in seconds).

Return type:

int

ice_locatorCacheTimeout(timeout: int) Self

Creates a proxy that is identical to this proxy, except for the locator cache timeout.

Parameters:

timeout (int) – The new locator cache timeout (in seconds).

Returns:

A proxy with the new timeout.

Return type:

Self

ice_invocationTimeout(timeout: int) Self

Creates a proxy that is identical to this proxy, except for the invocation timeout.

Parameters:

timeout (int) – The new invocation timeout (in milliseconds).

Returns:

A proxy with the new timeout.

Return type:

Self

ice_getInvocationTimeout() int

Gets the invocation timeout of this proxy.

Returns:

The invocation timeout value (in milliseconds).

Return type:

int

ice_isConnectionCached() bool

Determines whether this proxy caches connections.

Returns:

True if this proxy caches connections, False otherwise.

Return type:

bool

ice_connectionCached(newCache: bool) Self

Creates a proxy that is identical to this proxy, except for connection caching.

Parameters:

newCache (bool) – True if the new proxy should cache connections, False otherwise.

Returns:

A proxy with the specified caching policy.

Return type:

Self

ice_getEndpointSelection() EndpointSelectionType

Gets the endpoint selection policy for this proxy (randomly or ordered).

Returns:

The endpoint selection policy.

Return type:

EndpointSelectionType

ice_endpointSelection(newType: EndpointSelectionType) Self

Creates a proxy that is identical to this proxy, except for the endpoint selection policy.

Parameters:

newType (EndpointSelectionType) – The new endpoint selection policy.

Returns:

A proxy with the specified endpoint selection policy.

Return type:

Self

ice_encodingVersion(version: EncodingVersion) Self

Creates a proxy that is identical to this proxy, except for the encoding used to marshal parameters.

Parameters:

version (EncodingVersion) – The encoding version to use to marshal request parameters.

Returns:

A proxy with the specified encoding version.

Return type:

Self

ice_getEncodingVersion() EncodingVersion

Gets the encoding version used to marshal request parameters.

Returns:

The encoding version.

Return type:

EncodingVersion

ice_getRouter() RouterPrx | None

Gets the router for this proxy.

Returns:

The router for the proxy. If no router is configured for the proxy, the return value is None.

Return type:

RouterPrx | None

ice_router(router: RouterPrx | None) Self

Creates a proxy that is identical to this proxy, except for the router.

Parameters:

router (RouterPrx | None) – The router for the new proxy.

Returns:

A proxy with the specified router.

Return type:

Self

ice_getLocator() LocatorPrx | None

Gets the locator for this proxy.

Returns:

The locator for this proxy. If no locator is configured, the return value is None.

Return type:

LocatorPrx | None

ice_locator(locator: LocatorPrx | None) Self

Creates a proxy that is identical to this proxy, except for the locator.

Parameters:

locator (LocatorPrx | None) – The locator for the new proxy.

Returns:

A proxy with the specified locator.

Return type:

Self

ice_isCollocationOptimized() bool

Determines whether this proxy uses collocation optimization.

Returns:

True if the proxy uses collocation optimization, False otherwise.

Return type:

bool

ice_collocationOptimized(collocated: bool) Self

Creates a proxy that is identical to this proxy, except for collocation optimization.

Parameters:

collocated (bool) – True if the new proxy enables collocation optimization, False otherwise.

Returns:

A proxy with the specified collocation optimization.

Return type:

Self

ice_twoway() Self

Creates a proxy that is identical to this proxy, but uses twoway invocations.

Returns:

A proxy that uses twoway invocations.

Return type:

Self

ice_isTwoway() bool

Determines whether this proxy uses twoway invocations.

Returns:

True if this proxy uses twoway invocations, False otherwise.

Return type:

bool

ice_oneway() Self

Creates a proxy that is identical to this proxy, but uses oneway invocations.

Returns:

A proxy that uses oneway invocations.

Return type:

Self

ice_isOneway() bool

Determines whether this proxy uses oneway invocations.

Returns:

True if this proxy uses oneway invocations, False otherwise.

Return type:

bool

ice_batchOneway() Self

Creates a proxy that is identical to this proxy, but uses batch oneway invocations.

Returns:

A proxy that uses batch oneway invocations.

Return type:

Self

ice_isBatchOneway() bool

Determines whether this proxy uses batch oneway invocations.

Returns:

True if this proxy uses batch oneway invocations, False otherwise.

Return type:

bool

ice_datagram() Self

Creates a proxy that is identical to this proxy, but uses datagram invocations.

Returns:

A proxy that uses datagram invocations.

Return type:

Self

ice_isDatagram() bool

Determines whether this proxy uses datagram invocations.

Returns:

True if this proxy uses datagram invocations, False otherwise.

Return type:

bool

ice_batchDatagram() Self

Creates a proxy that is identical to this proxy, but uses batch datagram invocations.

Returns:

A proxy that uses batch datagram invocations.

Return type:

Self

ice_isBatchDatagram() bool

Determines whether this proxy uses batch datagram invocations.

Returns:

True if this proxy uses batch datagram invocations, False otherwise.

Return type:

bool

ice_compress(compress: bool) Self

Creates a proxy that is identical to this proxy, except for its compression setting which overrides the compression setting from the proxy endpoints.

Parameters:

compress (bool) – True enables compression for the new proxy, False disables compression.

Returns:

A proxy with the specified compression override setting.

Return type:

Self

ice_getCompress() bool | None

Gets the compression override setting of this proxy.

Returns:

  • The compression override setting. If None is returned, no override is set.

  • Otherwise, True if compression is enabled, False otherwise.

Return type:

bool | None

ice_connectionId(connectionId: str) Self

Creates a proxy that is identical to this proxy, except for its connection ID.

Parameters:

connectionId (str) – The connection ID for the new proxy. An empty string removes the connection ID.

Returns:

A proxy with the specified connection ID.

Return type:

Self

ice_getConnectionId() str

Gets the connection ID of this proxy.

Returns:

The connection ID.

Return type:

str

ice_fixed(connection: Connection) Self

Creates a proxy that is identical to this proxy, except it’s a fixed proxy bound to the given connection.

Parameters:

connection (Connection) – The fixed proxy connection.

Returns:

A fixed proxy bound to the given connection.

Return type:

Self

ice_isFixed() bool

Determines whether this proxy is a fixed proxy.

Returns:

True if this proxy is a fixed proxy, False otherwise.

Return type:

bool

ice_getConnection() Connection | None

Gets the connection for this proxy. If the proxy does not yet have an established connection, it first attempts to create a connection.

Returns:

The Connection for this proxy, or None when the target object is collocated.

Return type:

Connection | None

Notes

You can call this function to establish a connection or associate the proxy with an existing connection and ignore the return value.

ice_getCachedConnection() Connection | None

Gets the cached Connection for this proxy. If the proxy does not yet have an established connection, it does not attempt to create a connection.

Returns:

The cached connection for this proxy, or None if the proxy does not have an established connection.

Return type:

Connection | None

ice_flushBatchRequests() None

Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.

Return type:

None