Table of Contents

Interface ILocator

Namespace
IceRpc.Ice
Assembly
IceRpc.Locator.dll

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

public interface ILocator

Remarks

Use the methods of this interface to invoke operations on a remote Ice service that implements Locator. The Ice compiler generated this client-side interface from Ice interface ::Ice::Locator.

Methods

FindAdapterByIdAsync(string, IFeatureCollection?, CancellationToken)

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

Task<IceObjectProxy?> FindAdapterByIdAsync(string id, IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

id string

The adapter ID.

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task<IceObjectProxy?>

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

Exceptions

DispatchException

Thrown when the dispatch of the operation failed. This exception is provided through the returned task; it's never thrown synchronously.

AdapterNotFoundException

Thrown when an object adapter with this adapter ID was not found. The caller should treat this exception like a null return value. This exception is provided through the returned task; it's never thrown synchronously.

FindObjectByIdAsync(Identity, IFeatureCollection?, CancellationToken)

Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this object. This dummy proxy may be an indirect proxy that requires further resolution using FindAdapterByIdAsync(string, IFeatureCollection?, CancellationToken).

Task<IceObjectProxy?> FindObjectByIdAsync(Identity id, IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

id Identity

The identity.

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task<IceObjectProxy?>

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

Exceptions

DispatchException

Thrown when the dispatch of the operation failed. This exception is provided through the returned task; it's never thrown synchronously.

ObjectNotFoundException

Thrown when an object with the requested identity was not found. The caller should treat this exception like a null return value. This exception is provided through the returned task; it's never thrown synchronously.

GetRegistryAsync(IFeatureCollection?, CancellationToken)

Gets a proxy to the locator registry.

Task<LocatorRegistryProxy?> GetRegistryAsync(IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task<LocatorRegistryProxy?>

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

Exceptions

DispatchException

Thrown when the dispatch of the operation failed. This exception is provided through the returned task; it's never thrown synchronously.