Table of Contents

Interface IHandler

Namespace
NexusRpc.Handlers
Assembly
NexusRpc.dll

Interface for handling all inbound operations regardless of service. The primary implementation is at Handler.

public interface IHandler

Methods

CancelOperationAsync(OperationCancelContext)

Request operation cancel.

Task CancelOperationAsync(OperationCancelContext context)

Parameters

context OperationCancelContext

Context.

Returns

Task

Task when cancel has been sent.

Exceptions

HandlerException

Unexpected handler failure.

FetchOperationInfoAsync(OperationFetchInfoContext)

Fetch operation info.

Task<OperationInfo> FetchOperationInfoAsync(OperationFetchInfoContext context)

Parameters

context OperationFetchInfoContext

Context.

Returns

Task<OperationInfo>

Task with operation info.

Exceptions

HandlerException

Unexpected handler failure.

FetchOperationResultAsync(OperationFetchResultContext)

Fetch operation result, waiting if necessary.

Task<HandlerContent> FetchOperationResultAsync(OperationFetchResultContext context)

Parameters

context OperationFetchResultContext

Context.

Returns

Task<HandlerContent>

Task with result contents.

Exceptions

OperationStillRunningException

Operation still running (after optional wait).

OperationException

Operation failed.

HandlerException

Unexpected handler failure.

StartOperationAsync(OperationStartContext, HandlerContent)

Start operation.

Task<OperationStartResult<HandlerContent>> StartOperationAsync(OperationStartContext context, HandlerContent input)

Parameters

context OperationStartContext

Context.

input HandlerContent

Operation input.

Returns

Task<OperationStartResult<HandlerContent>>

Task with sync or async result.

Exceptions

OperationException

Operation failed.

HandlerException

Unexpected handler failure.