Table of Contents

Struct ProcessProxy

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

Implements IProcess by making invocations on a remote IceRPC service. This remote service must implement Slice interface Ice::Process.

[SliceTypeId("::Ice::Process")]
public readonly record struct ProcessProxy : IProcess, IProxy, IEquatable<ProcessProxy>
Implements
Inherited Members
Extension Methods

Remarks

The Slice compiler generated this record struct from the Slice interface Ice::Process.

Constructors

ProcessProxy()

Constructs a proxy with an icerpc service address with path DefaultServicePath.

public ProcessProxy()

ProcessProxy(IInvoker, ServiceAddress?, SliceEncodeOptions?)

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

public ProcessProxy(IInvoker invoker, ServiceAddress? serviceAddress = null, SliceEncodeOptions? encodeOptions = null)

Parameters

invoker IInvoker

The invocation pipeline of the proxy.

serviceAddress ServiceAddress

The service address. null is equivalent to an icerpc service address with path DefaultServicePath.

encodeOptions SliceEncodeOptions

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

ProcessProxy(IInvoker, Uri, SliceEncodeOptions?)

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

public ProcessProxy(IInvoker invoker, Uri serviceAddressUri, SliceEncodeOptions? encodeOptions = null)

Parameters

invoker IInvoker

The invocation pipeline of the proxy.

serviceAddressUri Uri

A URI that represents a service address.

encodeOptions SliceEncodeOptions

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

Fields

DefaultServicePath

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

public const string DefaultServicePath = "/Ice.Process"

Field Value

string

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

SliceEncodeOptions

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

FromPath(string)

Creates a relative proxy from a path.

public static ProcessProxy FromPath(string path)

Parameters

path string

The path.

Returns

ProcessProxy

The new relative proxy.

ShutdownAsync(IFeatureCollection?, CancellationToken)

Initiates a graceful shutdown of the server application.

public Task ShutdownAsync(IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

features IFeatureCollection

The invocation features.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task

A task that completes when the response is received.

WriteMessageAsync(string, int, IFeatureCollection?, CancellationToken)

Writes a message on the server application's stdout or stderr.

public Task WriteMessageAsync(string message, int fd, IFeatureCollection? features = null, CancellationToken cancellationToken = default)

Parameters

message string

The message to write.

fd int

'1' for stdout, '2' for stderr.

features IFeatureCollection

The invocation features.

cancellationToken CancellationToken

A cancellation token that receives the cancellation requests.

Returns

Task

A task that completes when the response is received.