Skip to content

WebhookDeliveryJobHandler

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Executes a single webhook delivery attempt (JobKind.WebhookDelivery).

public sealed class WebhookDeliveryJobHandler : IJobHandler

objectWebhookDeliveryJobHandler

IJobHandler

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Retrying is left to the queue: a failed attempt throws JobRetryException, and the background worker puts the job back with the ladder’s delay. A second queue, a second lease, or a second scheduler is not written.

The target address is validated again on every attempt. A name that was valid at save time may resolve to a private address by delivery time (DNS rebinding).

WebhookDeliveryJobHandler(IWebhookStore, WebhookHttpClient, IOptionsMonitor<AgentPrismWebhookOptions>, IConfiguration?, TimeProvider?, ILogger<WebhookDeliveryJobHandler>?, IOptionsMonitor<AgentPrismEgressOptions>?)

Section titled “ WebhookDeliveryJobHandler(IWebhookStore, WebhookHttpClient, IOptionsMonitor<AgentPrismWebhookOptions>, IConfiguration?, TimeProvider?, ILogger<WebhookDeliveryJobHandler>?, IOptionsMonitor<AgentPrismEgressOptions>?)”

Executes a single webhook delivery attempt (JobKind.WebhookDelivery).

public WebhookDeliveryJobHandler(IWebhookStore store, WebhookHttpClient httpClient, IOptionsMonitor<AgentPrismWebhookOptions> optionsMonitor, IConfiguration? configuration = null, TimeProvider? timeProvider = null, ILogger<WebhookDeliveryJobHandler>? logger = null, IOptionsMonitor<AgentPrismEgressOptions>? egressOptions = null)

store IWebhookStore

httpClient WebhookHttpClient

optionsMonitor IOptionsMonitor<AgentPrismWebhookOptions>

configuration IConfiguration?

timeProvider TimeProvider?

logger ILogger<WebhookDeliveryJobHandler>?

egressOptions IOptionsMonitor<AgentPrismEgressOptions>?

Retrying is left to the queue: a failed attempt throws JobRetryException, and the background worker puts the job back with the ladder’s delay. A second queue, a second lease, or a second scheduler is not written.

The target address is validated again on every attempt. A name that was valid at save time may resolve to a private address by delivery time (DNS rebinding).

The job kind this handler can execute.

public JobKind Kind { get; }

JobKind

ExecuteAsync(JobContext, CancellationToken)

Section titled “ ExecuteAsync(JobContext, CancellationToken)”

Executes the job.

public ValueTask ExecuteAsync(JobContext context, CancellationToken cancellationToken = default)

context JobContext

The job context: record, items, reporting, and cancellation check.

cancellationToken CancellationToken

The cancellation token (triggered when the worker shuts down).

ValueTask

The completion task.

If the handler throws, the job is retried with IJobStore.ReleaseForRetryAsync (if the attempt limit is not exceeded) or marked as JobStatus.Failed.