Interface ILocator
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.
public interface ILocator
Remarks
The Slice compiler generated this client-side interface from Slice interface Ice::Locator
.
It's implemented by LocatorProxy.
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).
Task<ServiceAddress?> FindAdapterByIdAsync(string id, IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
id
stringThe adapter ID.
features
IFeatureCollectionThe invocation features.
cancellationToken
CancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task<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).
Task<ServiceAddress?> FindObjectByIdAsync(string id, IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
id
stringThe identity represented as a path.
features
IFeatureCollectionThe invocation features.
cancellationToken
CancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task<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.
Task<LocatorRegistryProxy?> GetRegistryAsync(IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
features
IFeatureCollectionThe invocation features.
cancellationToken
CancellationTokenA 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.