Table of Contents

Interface ILocatorService

Namespace
IceRpc.Slice.Ice
Assembly
IceRpc.Locator.dll

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

[SliceTypeId("::Ice::Locator")]
[DefaultServicePath("/Ice.Locator")]
public interface ILocatorService

Remarks

The Slice compiler generated this server-side interface from Slice interface Ice::Locator. Your service implementation must implement this interface.

Methods

FindAdapterByIdAsync(string, IFeatureCollection, CancellationToken)

Finds an object adapter by adapter ID and returns a dummy service address with the object adapter's server address(es).

ValueTask<ServiceAddress?> FindAdapterByIdAsync(string id, IFeatureCollection features, CancellationToken cancellationToken)

Parameters

id string

The adapter ID.

features IFeatureCollection

The dispatch features.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask<ServiceAddress>

A dummy service address with the adapter's server address(es), or null if an object adapter with adapter ID id was not found.

Exceptions

AdapterNotFoundException

Thrown if an object adapter with this adapter ID was not found. The caller should treat this exception like a null return value.

FindObjectByIdAsync(string, IFeatureCollection, CancellationToken)

Finds a service by identity (path) and returns a dummy service address with the server address(es) that can be used to reach this service. This dummy service address can also carry no server address and require further resolution using FindAdapterByIdAsync(string, IFeatureCollection?, CancellationToken).

ValueTask<ServiceAddress?> FindObjectByIdAsync(string id, IFeatureCollection features, CancellationToken cancellationToken)

Parameters

id string

The identity represented as a path.

features IFeatureCollection

The dispatch features.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask<ServiceAddress>

A dummy service address, or null if a service with the requested identity (path) was not found.

Exceptions

ObjectNotFoundException

Thrown if a service with the requested identity (path) was not found. The caller should treat this exception like a null return value.

GetRegistryAsync(IFeatureCollection, CancellationToken)

Gets a proxy to the locator registry.

ValueTask<LocatorRegistryProxy?> GetRegistryAsync(IFeatureCollection features, CancellationToken cancellationToken)

Parameters

features IFeatureCollection

The dispatch features.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

ValueTask<LocatorRegistryProxy?>

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