Table of Contents

Struct LocatorRegistryProxy

Namespace
IceRpc.Ice
Assembly
IceRpc.Locator.dll

Implements ILocatorRegistry by making invocations on a remote IceRPC service. This remote service must implement Ice interface ::Ice::LocatorRegistry.

[IceTypeId("::Ice::LocatorRegistry")]
public readonly record struct LocatorRegistryProxy : ILocatorRegistry, IIceProxy, IEquatable<LocatorRegistryProxy>
Implements
Inherited Members
Extension Methods

Constructors

LocatorRegistryProxy()

Constructs a proxy that uses the default service address: its protocol is ice and its path is DefaultServicePath.

public LocatorRegistryProxy()

LocatorRegistryProxy(IInvoker, ServiceAddress?, IceEncodeOptions?)

Constructs a proxy from an invoker, a service address and encode options.

[SetsRequiredMembers]
public LocatorRegistryProxy(IInvoker invoker, ServiceAddress? serviceAddress = null, IceEncodeOptions? encodeOptions = null)

Parameters

invoker IInvoker

The invocation pipeline of the proxy.

serviceAddress ServiceAddress

The service address. null is equivalent to the default service address (protocol: ice, path: DefaultServicePath).

encodeOptions IceEncodeOptions

The encode options, used to customize the encoding of request payloads.

LocatorRegistryProxy(IInvoker, Uri, IceEncodeOptions?)

Constructs a proxy from an invoker, a service address URI and encode options.

[SetsRequiredMembers]
public LocatorRegistryProxy(IInvoker invoker, Uri serviceAddressUri, IceEncodeOptions? encodeOptions = null)

Parameters

invoker IInvoker

The invocation pipeline of the proxy.

serviceAddressUri Uri

A URI that represents a service address.

encodeOptions IceEncodeOptions

The encode options, used to customize the encoding of request payloads.

Fields

DefaultServicePath

Represents the default path for IceRPC services that implement Ice interface ::Ice::LocatorRegistry.

public const string DefaultServicePath = "/Ice.LocatorRegistry"

Field Value

string

Properties

EncodeOptions

Gets or initializes the encode options, used to customize the encoding of payloads created from this proxy.

public IceEncodeOptions? EncodeOptions { get; init; }

Property Value

IceEncodeOptions

Invoker

Gets or initializes the invocation pipeline of this proxy.

public required IInvoker Invoker { get; init; }

Property Value

IInvoker

ServiceAddress

Gets or initializes the address of the remote service.

public ServiceAddress ServiceAddress { get; init; }

Property Value

ServiceAddress

Methods

SetAdapterDirectProxyAsync(string, IceObjectProxy?, IFeatureCollection?, CancellationToken)

Registers or unregisters the endpoints of an object adapter.

public Task SetAdapterDirectProxyAsync(string id, IceObjectProxy? proxy, IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

id string

The adapter ID.

proxy IceObjectProxy?

A dummy proxy created by the object adapter. proxy carries the object adapter's endpoints. The locator considers an object adapter to be active after it has registered its endpoints. When proxy is null, the endpoints are unregistered and the locator considers the object adapter inactive.

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task

A task that completes when the response is received.

Exceptions

DispatchException

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

AdapterAlreadyActiveException

Thrown when an object adapter with the same adapter ID has already registered its endpoints. Since this operation is marked idempotent, this exception may be thrown when the Ice client runtime retries an invocation with a non-null proxy. This exception is provided through the returned task; it's never thrown synchronously.

AdapterNotFoundException

Thrown when the locator only allows registered object adapters to register their endpoints and no object adapter with this adapter ID was registered with the locator. This exception is provided through the returned task; it's never thrown synchronously.

SetReplicatedAdapterDirectProxyAsync(string, string, IceObjectProxy?, IFeatureCollection?, CancellationToken)

Registers or unregisters the endpoints of an object adapter. This object adapter is a member of a replica group.

public Task SetReplicatedAdapterDirectProxyAsync(string adapterId, string replicaGroupId, IceObjectProxy? proxy, IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

adapterId string

The adapter ID.

replicaGroupId string

The replica group ID.

proxy IceObjectProxy?

A dummy proxy created by the object adapter. proxy carries the object adapter's endpoints. The locator considers an object adapter to be active after it has registered its endpoints. When proxy is null, the endpoints are unregistered and the locator considers the object adapter inactive.

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task

A task that completes when the response is received.

Exceptions

DispatchException

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

AdapterAlreadyActiveException

Thrown when an object adapter with the same adapter ID has already registered its endpoints. Since this operation is marked idempotent, this exception may be thrown when the Ice client runtime retries an invocation with a non-null proxy. This exception is provided through the returned task; it's never thrown synchronously.

AdapterNotFoundException

Thrown when the locator only allows registered object adapters to register their endpoints and no object adapter with this adapter ID was registered with the locator. This exception is provided through the returned task; it's never thrown synchronously.

InvalidReplicaGroupIdException

Thrown when the given replica group does not match the replica group associated with the adapter ID in the locator's database. This exception is provided through the returned task; it's never thrown synchronously.

SetServerProcessProxyAsync(string, ProcessProxy?, IFeatureCollection?, CancellationToken)

Registers a proxy to the ProcessProxy object of a server application.

public Task SetServerProcessProxyAsync(string id, ProcessProxy? proxy, IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

id string

The server ID.

proxy ProcessProxy?

A proxy to the ProcessProxy object of the server. This proxy is never null.

features IFeatureCollection

The features of this invocation.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task

A task that completes when the response is received.

Exceptions

DispatchException

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

ServerNotFoundException

Thrown when the locator does not know a server application with a server ID of id. This exception is provided through the returned task; it's never thrown synchronously.