Interface ILocator
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
idstringThe adapter ID.
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA 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
idwas 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
idIdentityThe identity.
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA 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
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA 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.