Ice.ObjectPrx¶
- class Ice.ObjectPrx¶
Bases:
ObjectPrxThe base class for all proxies.
- 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:
- 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, 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:
- 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
- ice_adapterId(newAdapterId: str) Self¶
Creates a new proxy that is identical to this proxy, except for the adapter ID.
- ice_batchDatagram() Self¶
Creates a new proxy that is identical to this proxy, but uses batch datagram invocations.
- Returns:
A new proxy that uses batch datagram invocations.
- Return type:
- ice_batchOneway() Self¶
Creates a new proxy that is identical to this proxy, but uses batch oneway invocations.
- Returns:
A new proxy that uses batch oneway invocations.
- Return type:
- ice_collocationOptimized(collocated: bool) Self¶
Creates a new proxy that is identical to this proxy, except for collocation optimization.
- ice_compress(compress: bool) Self¶
Creates a new proxy that is identical to this proxy, except for compression.
- ice_connectionCached(newCache: bool) Self¶
Creates a new proxy that is identical to this proxy, except for connection caching.
- ice_connectionId(connectionId: str) Self¶
Creates a new proxy that is identical to this proxy, except for its connection ID.
- ice_context(new_context: dict[str, str]) Self¶
Creates a new proxy that is identical to this proxy, except for the per-proxy context.
- ice_datagram() Self¶
Creates a new proxy that is identical to this proxy, but uses datagram invocations.
- Returns:
A new proxy that uses datagram invocations.
- Return type:
- ice_encodingVersion(version: EncodingVersion) Self¶
Creates a new 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 requests parameters.
- Returns:
The new proxy with the specified encoding version.
- Return type:
- ice_endpointSelection(newType: EndpointSelectionType) Self¶
Creates a new proxy that is identical to this proxy, except for the endpoint selection policy.
- Parameters:
newType (EndpointSelectionType) – The new endpoint selection policy.
- Returns:
The new proxy with the specified endpoint selection policy.
- Return type:
- ice_endpoints(newEndpoints: tuple[Endpoint, ...] | list[Endpoint]) Self¶
Creates a new proxy that is identical to this proxy, except for the endpoints.
- ice_facet(new_facet: str) Self¶
Creates a new proxy that is identical to this proxy, except for the facet.
- ice_fixed(connection: Connection) Self¶
Returns 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:
- ice_flushBatchRequests() None¶
Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
- Return type:
None
- ice_getAdapterId() str¶
Returns 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:
- ice_getCachedConnection() Connection | None¶
Returns 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 (None if the proxy does not have an established connection).
- Return type:
Connection | None
- ice_getCommunicator() Communicator¶
Return the communicator that created this proxy.
- Returns:
The communicator that created this proxy.
- Return type:
- ice_getCompress() bool | None¶
Obtains the compression override setting of this proxy.
- Returns:
The compression override setting. If no optional value is present, no override is set. Otherwise, true if compression is enabled, false otherwise.
- Return type:
bool or None
- ice_getConnection() Connection | None¶
Returns 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 null when the target object is collocated.
- Return type:
Connection | None
- ice_getConnectionId() str¶
Returns the connection id of this proxy.
- Returns:
The connection id.
- Return type:
- ice_getEncodingVersion() EncodingVersion¶
Returns the encoding version used to marshal requests parameters.
- Returns:
The encoding version.
- Return type:
- ice_getEndpointSelection() EndpointSelectionType¶
Returns how this proxy selects endpoints (randomly or ordered).
- Returns:
The endpoint selection policy.
- Return type:
- ice_getEndpoints() tuple[Endpoint, ...]¶
Returns the endpoints used by this proxy.
- Returns:
The endpoints used by this proxy.
- Return type:
tuple[IcePy.Endpoint, …]
- ice_getFacet() str¶
Returns 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:
- ice_getIdentity() Identity¶
Return the identity embedded in this proxy.
- Returns:
The identity of the target object.
- Return type:
- ice_getInvocationTimeout() int¶
Returns the invocation timeout of this proxy.
- Returns:
The invocation timeout value (in seconds).
- Return type:
- ice_getLocator() LocatorPrx | None¶
Returns the locator for this proxy.
- Returns:
The locator for this proxy. If no locator is configured, the return value is None.
- Return type:
LocatorPrx or None
- ice_getLocatorCacheTimeout() int¶
Returns the locator cache timeout of this proxy.
- Returns:
The locator cache timeout value (in seconds).
- Return type:
- ice_getRouter() RouterPrx | None¶
Returns 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 or None
- ice_id(context: dict[str, str] | None = None) str¶
Return the Slice type ID of the most-derived interface supported by the target object of this proxy.
- ice_idAsync(context: dict[str, str] | None = None) Awaitable[str]¶
Return the Slice type ID of the most-derived interface supported by the target object of this proxy.
- ice_identity(newIdentity: Identity) Self¶
Create a new proxy that is identical to this proxy, except for the per-proxy context.
- ice_ids(context: dict[str, str] | None = None) list[str]¶
Return the Slice type IDs of the interfaces supported by the target object of this proxy.
- ice_idsAsync(context: dict[str, str] | None = None) Awaitable[list[str]]¶
Return the Slice type IDs of the interfaces supported by the target object of this proxy.
- ice_invocationTimeout(timeout: int) Self¶
Creates a new proxy that is identical to this proxy, except for the invocation timeout.
- ice_isA(id: str, context: dict[str, str] | None = None) bool¶
Test whether this object supports a specific Slice interface.
- ice_isAAsync(id: str, context: dict[str, str] | None = None) Awaitable[bool]¶
Test whether this object supports a specific Slice interface.
- ice_isBatchDatagram() bool¶
Returns whether this proxy uses batch datagram invocations.
- Returns:
True if this proxy uses batch datagram invocations; False otherwise.
- Return type:
- ice_isBatchOneway() bool¶
Returns whether this proxy uses batch oneway invocations.
- Returns:
True if this proxy uses batch oneway invocations; False otherwise.
- Return type:
- ice_isCollocationOptimized() bool¶
Returns whether this proxy uses collocation optimization.
- Returns:
True if the proxy uses collocation optimization; False otherwise.
- Return type:
- ice_isConnectionCached() bool¶
Returns whether this proxy caches connections.
- Returns:
True if this proxy caches connections; False otherwise.
- Return type:
- ice_isDatagram() bool¶
Returns whether this proxy uses datagram invocations.
- Returns:
True if this proxy uses datagram invocations; False otherwise.
- Return type:
- ice_isFixed() bool¶
Returns whether this proxy is a fixed proxy.
- Returns:
True if this is a fixed proxy; False otherwise.
- Return type:
- ice_isOneway() bool¶
Returns whether this proxy uses oneway invocations.
- Returns:
True if this proxy uses oneway invocations; False otherwise.
- Return type:
- ice_isTwoway() bool¶
Returns whether this proxy uses twoway invocations.
- Returns:
True if this proxy uses twoway invocations; False otherwise.
- Return type:
- ice_locator(locator: LocatorPrx | None) Self¶
Creates a new proxy that is identical to this proxy, except for the locator.
- Parameters:
locator (LocatorPrx or None) – The locator for the new proxy.
- Returns:
The new proxy with the specified locator.
- Return type:
- ice_locatorCacheTimeout(timeout: int) Self¶
Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
- ice_oneway() Self¶
Creates a new proxy that is identical to this proxy, but uses oneway invocations.
- Returns:
A new proxy that uses oneway invocations.
- Return type:
- ice_ping(context: dict[str, str] | None = None)¶
Test whether the target object of this proxy can be reached.
Examples
>>> obj.ice_ping(context={"key": "value"})
- ice_pingAsync(context: dict[str, str] | None = None)¶
Test whether the target object of this proxy can be reached.
Examples
>>> obj.ice_ping(context={"key": "value"})
- ice_router(router: RouterPrx | None) Self¶
Creates a new proxy that is identical to this proxy, except for the router.
- static ice_staticId() str¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
- ice_twoway() Self¶
Creates a new proxy that is identical to this proxy, but uses twoway invocations.
- Returns:
A new proxy that uses twoway invocations.
- Return type: