Struct ProcessProxy
Implements IProcess by making invocations on a remote IceRPC service.
This remote service must implement Ice interface ::Ice::Process.
[IceTypeId("::Ice::Process")]
public readonly record struct ProcessProxy : IProcess, IIceProxy, IEquatable<ProcessProxy>
- Implements
- Inherited Members
- Extension Methods
Constructors
ProcessProxy()
Constructs a proxy that uses the default service address: its protocol is ice
and its path is DefaultServicePath.
public ProcessProxy()
ProcessProxy(IInvoker, ServiceAddress?, IceEncodeOptions?)
Constructs a proxy from an invoker, a service address and encode options.
[SetsRequiredMembers]
public ProcessProxy(IInvoker invoker, ServiceAddress? serviceAddress = null, IceEncodeOptions? encodeOptions = null)
Parameters
invokerIInvokerThe invocation pipeline of the proxy.
serviceAddressServiceAddressThe service address. null is equivalent to the default service address (protocol:
ice, path: DefaultServicePath).encodeOptionsIceEncodeOptionsThe encode options, used to customize the encoding of request payloads.
ProcessProxy(IInvoker, Uri, IceEncodeOptions?)
Constructs a proxy from an invoker, a service address URI and encode options.
[SetsRequiredMembers]
public ProcessProxy(IInvoker invoker, Uri serviceAddressUri, IceEncodeOptions? encodeOptions = null)
Parameters
invokerIInvokerThe invocation pipeline of the proxy.
serviceAddressUriUriA URI that represents a service address.
encodeOptionsIceEncodeOptionsThe encode options, used to customize the encoding of request payloads.
Fields
DefaultServicePath
Represents the default path for IceRPC services that implement Ice interface
::Ice::Process.
public const string DefaultServicePath = "/Ice.Process"
Field Value
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
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
ShutdownAsync(IFeatureCollection?, CancellationToken)
Initiates a graceful shutdown of the server application.
public Task ShutdownAsync(IFeatureCollection? features = null, CancellationToken cancellationToken = default)
Parameters
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA 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.
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
messagestringThe message to write.
fdint1 for stdout, 2 for stderr.
featuresIFeatureCollectionThe features of this invocation.
cancellationTokenCancellationTokenA 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.