Interface ObjectPrx
- Namespace
- Ice
- Assembly
- Ice.dll
The base interface of all Ice proxies.
public interface ObjectPrx : IEquatable<ObjectPrx>
- Inherited Members
Methods
checkNotNull(ObjectPrx?, Current)
Ensures that a proxy received over the wire is not null.
public static void checkNotNull(ObjectPrx? proxy, Current current)
Parameters
proxyObjectPrxThe proxy to check.
currentCurrentThe current object of the corresponding incoming request.
Exceptions
- MarshalException
Thrown when the proxy is null.
ice_adapterId(string)
Creates a new proxy that is identical to this proxy, except for the adapter ID.
ObjectPrx ice_adapterId(string newAdapterId)
Parameters
newAdapterIdstringThe adapter ID for the new proxy.
Returns
- ObjectPrx
The proxy with the new adapter ID.
ice_batchDatagram()
Creates a new proxy that is identical to this proxy, but uses batch datagram invocations.
ObjectPrx ice_batchDatagram()
Returns
- ObjectPrx
A new proxy that uses batch datagram invocations.
ice_batchOneway()
Creates a new proxy that is identical to this proxy, but uses batch oneway invocations.
ObjectPrx ice_batchOneway()
Returns
- ObjectPrx
A new proxy that uses batch oneway invocations.
ice_collocationOptimized(bool)
Creates a new proxy that is identical to this proxy, except for collocation optimization.
ObjectPrx ice_collocationOptimized(bool collocated)
Parameters
Returns
- ObjectPrx
The new proxy with the specified collocation optimization.
ice_compress(bool)
Creates a new proxy that is identical to this proxy, except for compression.
ObjectPrx ice_compress(bool compress)
Parameters
Returns
- ObjectPrx
A new proxy with the specified compression setting.
ice_connectionCached(bool)
Creates a new proxy that is identical to this proxy, except for connection caching.
ObjectPrx ice_connectionCached(bool newCache)
Parameters
Returns
- ObjectPrx
The new proxy with the specified caching policy.
ice_connectionId(string)
Creates a new proxy that is identical to this proxy, except for its connection ID.
ObjectPrx ice_connectionId(string connectionId)
Parameters
connectionIdstringThe connection ID for the new proxy. An empty string removes the connection ID.
Returns
- ObjectPrx
A new proxy with the specified connection ID.
ice_context(Dictionary<string, string>)
Creates a new proxy that is identical to this proxy, except for the per-proxy context.
ObjectPrx ice_context(Dictionary<string, string> newContext)
Parameters
newContextDictionary<string, string>The context for the new proxy.
Returns
- ObjectPrx
The proxy with the new per-proxy context.
ice_datagram()
Creates a new proxy that is identical to this proxy, but uses datagram invocations.
ObjectPrx ice_datagram()
Returns
- ObjectPrx
A new proxy that uses datagram invocations.
ice_encodingVersion(EncodingVersion)
Creates a new proxy that is identical to this proxy, except for the encoding used to marshal parameters.
ObjectPrx ice_encodingVersion(EncodingVersion encodingVersion)
Parameters
encodingVersionEncodingVersionThe encoding version to use to marshal request parameters.
Returns
- ObjectPrx
The new proxy with the specified encoding version.
ice_endpointSelection(EndpointSelectionType)
Creates a new proxy that is identical to this proxy, except for the endpoint selection policy.
ObjectPrx ice_endpointSelection(EndpointSelectionType newType)
Parameters
newTypeEndpointSelectionTypeThe new endpoint selection policy.
Returns
- ObjectPrx
The new proxy with the specified endpoint selection policy.
ice_endpoints(Endpoint[])
Creates a new proxy that is identical to this proxy, except for the endpoints.
ObjectPrx ice_endpoints(Endpoint[] newEndpoints)
Parameters
newEndpointsEndpoint[]The endpoints for the new proxy.
Returns
- ObjectPrx
The proxy with the new endpoints.
ice_facet(string)
Creates a new proxy that is identical to this proxy, except for the facet.
ObjectPrx ice_facet(string newFacet)
Parameters
newFacetstringThe facet for the new proxy.
Returns
- ObjectPrx
The proxy with the new facet.
ice_fixed(Connection)
Returns a proxy that is identical to this proxy, except it's a fixed proxy bound to the given connection.
ObjectPrx ice_fixed(Connection connection)
Parameters
connectionConnectionThe fixed proxy connection.
Returns
- ObjectPrx
A fixed proxy bound to the given connection.
ice_flushBatchRequests()
Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
void ice_flushBatchRequests()
ice_flushBatchRequestsAsync(IProgress<bool>?, CancellationToken)
Asynchronously flushes any pending batched requests for this proxy.
Task ice_flushBatchRequestsAsync(IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task
The task object representing the asynchronous operation.
ice_getAdapterId()
Gets the adapter ID for this proxy.
string ice_getAdapterId()
Returns
- string
The adapter ID. If the proxy does not have an adapter ID, the return value is the empty string.
ice_getCachedConnection()
Gets the cached Connection for this proxy. Once this proxy has been associated with a connection (typically during its first invocation), it caches this connection and continues using it for subsequent invocations, until an invocation on this proxy fails. This method never attempts to establish a connection. For a fixed proxy, this method returns the connection this proxy is bound to, even when this connection is closed. This method never throws.
Connection? ice_getCachedConnection()
Returns
- Connection
The cached connection, or null if this proxy doesn't have a cached connection. The returned connection can be closed.
Remarks
A proxy with connection caching disabled (see ice_connectionCached(bool)) never caches a connection: for such a proxy, this method always returns null. This method also returns null when this proxy reaches its target object through collocation optimization (see ice_collocationOptimized(bool)): collocated invocations don't use a connection.
ice_getCommunicator()
Gets the communicator that created this proxy.
Communicator ice_getCommunicator()
Returns
- Communicator
The communicator that created this proxy.
ice_getCompress()
Gets the compression override setting of this proxy.
bool? ice_getCompress()
Returns
- bool?
The compression override setting, or null if no override is set. When set, it's true if compression is enabled; otherwise, false.
ice_getConnection()
Gets the connection to the server that hosts the target object. This method establishes a new connection to the server if the connection is not already established, or if the previously established connection is closed or being closed. For a fixed proxy, this method returns the connection this proxy is bound to, even when this connection is closed.
Connection? ice_getConnection()
Returns
- Connection
The connection to the server that hosts the target object, or null when this proxy uses collocation optimization to communicate with the target object.
ice_getConnectionAsync(IProgress<bool>?, CancellationToken)
Gets the connection to the server that hosts the target object. This method establishes a new connection to the server if the connection is not already established, or if the previously established connection is closed or being closed. For a fixed proxy, this method returns the connection this proxy is bound to, even when this connection is closed.
Task<Connection?> ice_getConnectionAsync(IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task<Connection>
The connection to the server that hosts the target object, or null when this proxy uses collocation optimization to communicate with the target object.
ice_getConnectionId()
Gets the connection id of this proxy.
string ice_getConnectionId()
Returns
- string
The connection id.
ice_getContext()
Gets the per-proxy context for this proxy.
Dictionary<string, string> ice_getContext()
Returns
- Dictionary<string, string>
A copy of the per-proxy context. The dictionary is empty when this proxy has no per-proxy context.
ice_getEncodingVersion()
Gets the encoding version used to marshal request parameters.
EncodingVersion ice_getEncodingVersion()
Returns
- EncodingVersion
The encoding version.
ice_getEndpointSelection()
Returns how this proxy selects endpoints (randomly or ordered).
EndpointSelectionType ice_getEndpointSelection()
Returns
- EndpointSelectionType
The endpoint selection policy.
ice_getEndpoints()
Gets the endpoints used by this proxy.
Endpoint[] ice_getEndpoints()
Returns
- Endpoint[]
The endpoints used by this proxy.
ice_getFacet()
Gets the facet for this proxy.
string ice_getFacet()
Returns
- string
The facet for this proxy. If the proxy uses the default facet, the return value is the empty string.
ice_getIdentity()
Gets the identity embedded in this proxy.
Identity ice_getIdentity()
Returns
- Identity
The identity of the target object.
ice_getInvocationTimeout()
Gets the invocation timeout of this proxy.
TimeSpan ice_getInvocationTimeout()
Returns
- TimeSpan
The invocation timeout value.
ice_getLocator()
Gets the locator for this proxy.
LocatorPrx? ice_getLocator()
Returns
- LocatorPrx
The locator for this proxy. If no locator is configured, the return value is null.
ice_getLocatorCacheTimeout()
Gets the locator cache timeout of this proxy.
TimeSpan ice_getLocatorCacheTimeout()
Returns
- TimeSpan
The locator cache timeout value.
ice_getRouter()
Gets the router for this proxy.
RouterPrx? ice_getRouter()
Returns
- RouterPrx
The router for the proxy. If no router is configured for the proxy, the return value is null.
ice_id(Dictionary<string, string>?)
Gets the Slice type ID of the most-derived interface supported by the target object of this proxy.
string ice_id(Dictionary<string, string>? context = null)
Parameters
contextDictionary<string, string>The request context.
Returns
- string
The Slice type ID of the most-derived interface.
ice_idAsync(Dictionary<string, string>?, IProgress<bool>?, CancellationToken)
Gets the Slice type ID of the most-derived interface supported by the target object of this proxy.
Task<string> ice_idAsync(Dictionary<string, string>? context = null, IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
contextDictionary<string, string>The request context.
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
ice_identity(Identity)
Creates a new proxy that is identical to this proxy, except for the proxy identity.
ObjectPrx ice_identity(Identity newIdentity)
Parameters
newIdentityIdentityThe identity for the new proxy.
Returns
- ObjectPrx
The new proxy with the specified identity.
ice_ids(Dictionary<string, string>?)
Returns the Slice interfaces supported by this object as a list of Slice type IDs.
string[] ice_ids(Dictionary<string, string>? context = null)
Parameters
contextDictionary<string, string>The request context.
Returns
- string[]
The Slice type IDs of the interfaces supported by this object, in alphabetical order.
ice_idsAsync(Dictionary<string, string>?, IProgress<bool>?, CancellationToken)
Returns the Slice interfaces supported by this object as a list of Slice type IDs.
Task<string[]> ice_idsAsync(Dictionary<string, string>? context = null, IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
contextDictionary<string, string>The request context.
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task<string[]>
A task that will complete with The Slice type IDs of the interfaces supported by this object, in alphabetical order.
ice_invocationTimeout(int)
Creates a new proxy that is identical to this proxy, except for the invocation timeout.
ObjectPrx ice_invocationTimeout(int newTimeout)
Parameters
newTimeoutintThe new invocation timeout (in milliseconds). Zero or any negative value means infinite and is normalized to -1.
Returns
ice_invocationTimeout(TimeSpan)
Creates a new proxy that is identical to this proxy, except for the invocation timeout.
ObjectPrx ice_invocationTimeout(TimeSpan newTimeout)
Parameters
newTimeoutTimeSpanThe new invocation timeout. Zero or any negative timeout means infinite and is normalized to -1 millisecond; a timeout that is not a whole number of milliseconds is rounded up to the next whole number of milliseconds.
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when
newTimeoutis greater than MaxValue milliseconds.
ice_invoke(string, OperationMode, byte[], out byte[], Dictionary<string, string>?)
Invokes an operation dynamically.
bool ice_invoke(string operation, OperationMode mode, byte[] inEncaps, out byte[] outEncaps, Dictionary<string, string>? context = null)
Parameters
operationstringThe name of the operation to invoke.
modeOperationModeThe operation mode (normal or idempotent).
inEncapsbyte[]The encoded in-parameters for the operation. You can pass an empty byte array when the operation takes no in-parameters; the Ice runtime then marshals an empty encapsulation.
outEncapsbyte[]The encoded out-parameters and return value for the operation. The return value follows any out-parameters.
contextDictionary<string, string>The request context.
Returns
- bool
If the operation completed successfully, the return value is true. If the operation raises a user exception, the return value is false; in this case,
outEncapscontains the encoded user exception. If the operation raises a runtime exception, it throws it directly. When this proxy is a oneway, datagram, or batch proxy, the return value is always true andoutEncapsis empty.
ice_invokeAsync(string, OperationMode, byte[], Dictionary<string, string>?, IProgress<bool>?, CancellationToken)
Invokes an operation dynamically.
Task<Object_Ice_invokeResult> ice_invokeAsync(string operation, OperationMode mode, byte[] inEncaps, Dictionary<string, string>? context = null, IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
operationstringThe name of the operation to invoke.
modeOperationModeThe operation mode (normal or idempotent).
inEncapsbyte[]The encoded in-parameters for the operation. You can pass an empty byte array when the operation takes no in-parameters; the Ice runtime then marshals an empty encapsulation.
contextDictionary<string, string>The request context.
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task<Object_Ice_invokeResult>
The task object representing the asynchronous operation. When this proxy is a oneway, datagram, or batch proxy, the task completes with
returnValueset to true and an emptyoutEncaps.
ice_isA(string, Dictionary<string, string>?)
Tests whether this object supports a specific Slice interface.
bool ice_isA(string id, Dictionary<string, string>? context = null)
Parameters
idstringThe type ID of the Slice interface to test against.
contextDictionary<string, string>The request context.
Returns
- bool
true if the target object implements the Slice interface specified by
idor implements a derived interface; otherwise, false.
ice_isAAsync(string, Dictionary<string, string>?, IProgress<bool>?, CancellationToken)
Tests whether this object supports a specific Slice interface.
Task<bool> ice_isAAsync(string id, Dictionary<string, string>? context = null, IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
idstringThe type ID of the Slice interface to test against.
contextDictionary<string, string>The request context.
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task<bool>
A task that will complete with true if the target object implements the Slice interface specified by
idor implements a derived interface; otherwise, false.
ice_isBatchDatagram()
Returns whether this proxy uses batch datagram invocations.
bool ice_isBatchDatagram()
Returns
ice_isBatchOneway()
Returns whether this proxy uses batch oneway invocations.
bool ice_isBatchOneway()
Returns
ice_isCollocationOptimized()
Returns whether this proxy has collocation optimization enabled.
bool ice_isCollocationOptimized()
Returns
- See Also
ice_isConnectionCached()
Returns whether this proxy caches connections.
bool ice_isConnectionCached()
Returns
ice_isDatagram()
Returns whether this proxy uses datagram invocations.
bool ice_isDatagram()
Returns
ice_isFixed()
Returns whether this proxy is a fixed proxy.
bool ice_isFixed()
Returns
ice_isOneway()
Returns whether this proxy uses oneway invocations.
bool ice_isOneway()
Returns
ice_isTwoway()
Returns whether this proxy uses twoway invocations.
bool ice_isTwoway()
Returns
ice_locator(LocatorPrx?)
Creates a new proxy that is identical to this proxy, except for the locator.
ObjectPrx ice_locator(LocatorPrx? locator)
Parameters
locatorLocatorPrxThe locator for the new proxy.
Returns
- ObjectPrx
The new proxy with the specified locator.
ice_locatorCacheTimeout(int)
Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
ObjectPrx ice_locatorCacheTimeout(int newTimeout)
Parameters
newTimeoutintThe new locator cache timeout (in seconds). Any negative value means infinite and is normalized to -1.
Returns
ice_locatorCacheTimeout(TimeSpan)
Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
ObjectPrx ice_locatorCacheTimeout(TimeSpan newTimeout)
Parameters
newTimeoutTimeSpanThe new locator cache timeout. Any negative timeout means infinite and is normalized to -1 second; a timeout that is not a whole number of seconds is rounded up to the next whole number of seconds.
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when
newTimeoutis greater than MaxValue seconds.
ice_oneway()
Creates a new proxy that is identical to this proxy, but uses oneway invocations.
ObjectPrx ice_oneway()
Returns
- ObjectPrx
A new proxy that uses oneway invocations.
ice_ping(Dictionary<string, string>?)
Tests whether the target object of this proxy can be reached.
void ice_ping(Dictionary<string, string>? context = null)
Parameters
contextDictionary<string, string>The request context.
ice_pingAsync(Dictionary<string, string>?, IProgress<bool>?, CancellationToken)
Tests whether the target object of this proxy can be reached.
Task ice_pingAsync(Dictionary<string, string>? context = null, IProgress<bool>? progress = null, CancellationToken cancel = default)
Parameters
contextDictionary<string, string>The request context.
progressIProgress<bool>Sent progress provider.
cancelCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task
A task that completes when the invocation completes.
ice_router(RouterPrx?)
Creates a new proxy that is identical to this proxy, except for the router.
ObjectPrx ice_router(RouterPrx? router)
Parameters
routerRouterPrxThe router for the new proxy.
Returns
- ObjectPrx
The new proxy with the specified router.
ice_scheduler()
Returns a scheduler object that uses the Ice thread pool.
TaskScheduler ice_scheduler()
Returns
- TaskScheduler
The task scheduler object.
ice_twoway()
Creates a new proxy that is identical to this proxy, but uses twoway invocations.
ObjectPrx ice_twoway()
Returns
- ObjectPrx
A new proxy that uses twoway invocations.