Struct LocatorRegistryProxy
Implements ILocatorRegistry by making invocations on a remote IceRPC service. This remote service must implement Slice interface Ice::LocatorRegistry.
[SliceTypeId("::Ice::LocatorRegistry")]
public readonly record struct LocatorRegistryProxy : ILocatorRegistry, IProxy, IEquatable<LocatorRegistryProxy>
- Implements
- Inherited Members
- Extension Methods
Remarks
The Slice compiler generated this record struct from the Slice interface Ice::LocatorRegistry.
Constructors
LocatorRegistryProxy()
Constructs a proxy with an icerpc service address with path DefaultServicePath.
public LocatorRegistryProxy()
LocatorRegistryProxy(IInvoker, ServiceAddress?, SliceEncodeOptions?)
Constructs a proxy from an invoker, a service address and encode options.
public LocatorRegistryProxy(IInvoker invoker, ServiceAddress? serviceAddress = null, SliceEncodeOptions? encodeOptions = null)
Parameters
invokerIInvokerThe invocation pipeline of the proxy.
serviceAddressServiceAddressThe service address. null is equivalent to an icerpc service address with path DefaultServicePath.
encodeOptionsSliceEncodeOptionsThe encode options, used to customize the encoding of request payloads.
LocatorRegistryProxy(IInvoker, Uri, SliceEncodeOptions?)
Constructs a proxy from an invoker, a service address URI and encode options.
public LocatorRegistryProxy(IInvoker invoker, Uri serviceAddressUri, SliceEncodeOptions? encodeOptions = null)
Parameters
invokerIInvokerThe invocation pipeline of the proxy.
serviceAddressUriUriA URI that represents a service address.
encodeOptionsSliceEncodeOptionsThe encode options, used to customize the encoding of request payloads.
Fields
DefaultServicePath
Represents the default path for IceRPC services that implement Slice interface
Ice::LocatorRegistry.
public const string DefaultServicePath = "/Ice.LocatorRegistry"
Field Value
Properties
EncodeOptions
Gets or initializes the encode options, used to customize the encoding of payloads created from this proxy.
public SliceEncodeOptions? EncodeOptions { get; init; }
Property Value
Invoker
Gets or initializes the invocation pipeline of this proxy.
public required IInvoker Invoker { get; init; }
Property Value
ServiceAddress
Gets or initializes the address of the remote service.
public ServiceAddress ServiceAddress { get; init; }
Property Value
Methods
FromPath(string)
Creates a relative proxy from a path.
public static LocatorRegistryProxy FromPath(string path)
Parameters
pathstringThe path.
Returns
- LocatorRegistryProxy
The new relative proxy.
SetAdapterDirectProxyAsync(string, ServiceAddress?, IFeatureCollection?, CancellationToken)
Registers or unregisters the server addresses of an object adapter.
public Task SetAdapterDirectProxyAsync(string id, ServiceAddress? proxy = null, IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
idstringThe adapter ID.
proxyServiceAddressA dummy service address created by the object adapter. proxy carries the object adapter's server addresses. The locator considers an object adapter to be active after it has registered its server addresses. When proxy is null, the server addresses are unregistered and the locator considers the object adapter inactive.
featuresIFeatureCollectionThe invocation features.
cancellationTokenCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task
A task that completes when the response is received.
Exceptions
- AdapterNotFoundException
Thrown if the locator only allows registered object adapters to register their active server addresses and no object adapter with this adapter ID was registered with the locator.
- AdapterAlreadyActiveException
Thrown if an object adapter with the same adapter ID has already registered its server addresses.
SetReplicatedAdapterDirectProxyAsync(string, string, ServiceAddress?, IFeatureCollection?, CancellationToken)
Registers or unregisters the server addresses of an object adapter. This object adapter is a member of a replica group.
public Task SetReplicatedAdapterDirectProxyAsync(string adapterId, string replicaGroupId, ServiceAddress? proxy = null, IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
adapterIdstringThe adapter ID.
replicaGroupIdstringThe replica group ID.
proxyServiceAddressA dummy service address created by the object adapter. proxy carries the object adapter's server addresses. The locator considers an object adapter to be active after it has registered its server addresses. When proxy is null, the server addresses are unregistered and the locator considers the object adapter inactive.
featuresIFeatureCollectionThe invocation features.
cancellationTokenCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task
A task that completes when the response is received.
Exceptions
- AdapterNotFoundException
Thrown if the locator only allows registered object adapters to register their active server addresses and no object adapter with this adapter ID was registered with the locator.
- AdapterAlreadyActiveException
Thrown if an object adapter with the same adapter ID has already registered its server addresses.
- InvalidReplicaGroupIdException
Thrown if the given replica group does not match the replica group associated with the adapter ID in the locator's database.
SetServerProcessProxyAsync(string, ProcessProxy, IFeatureCollection?, CancellationToken)
Registers a proxy for the IProcess service of a server application.
public Task SetServerProcessProxyAsync(string serverId, ProcessProxy proxy, IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
serverIdstringThe server ID.
proxyProcessProxyA proxy for the Process service of the server application.
featuresIFeatureCollectionThe invocation features.
cancellationTokenCancellationTokenA cancellation token that receives the cancellation requests.
Returns
- Task
A task that completes when the response is received.
Exceptions
- ServerNotFoundException
Thrown if the locator does not know a server application with this server ID.