Table of Contents

Interface IManagementActionHandler

Namespace
Azure.Iot.Operations.Connector
Assembly
Azure.Iot.Operations.Connector.dll

User-implemented handler for management action invocations. The base ConnectorWorker dispatches every incoming request for the action to HandleAsync(ManagementActionInvokedEventArgs, CancellationToken); the action's AssetManagementGroupActionType is available on ActionType for handlers that want to differentiate Call / Read / Write semantics.

public interface IManagementActionHandler : IAsyncDisposable
Inherited Members

Remarks

Implementations are created per management action via IManagementActionHandlerFactory. The base connector manages executor lifecycle, notification handling, health reporting, and drain logic — the handler only needs to execute the business logic against the device.

The SDK is deliberately non-opinionated about Call / Read / Write payload shapes: all three carry request and response payloads and are routed identically. Whether (and how) to constrain payloads per type is up to the connector author.

Methods

HandleAsync(ManagementActionInvokedEventArgs, CancellationToken)

Handle a management action invocation.

Task<ManagementActionResponse> HandleAsync(ManagementActionInvokedEventArgs args, CancellationToken cancellationToken)

Parameters

args ManagementActionInvokedEventArgs

Details about the invocation including payload, metadata, and the action type (ActionType).

cancellationToken CancellationToken

Signaled when the request is no longer applicable (action deleted/replaced, asset unavailable, connector shutting down). Implementations should abort device I/O promptly.

Returns

Task<ManagementActionResponse>

The response to send back to the invoker.