WebhookDeliveryJobHandler
AgentPrism.Core.dllExecutes a single webhook delivery attempt (JobKind.WebhookDelivery).
public sealed class WebhookDeliveryJobHandler : IJobHandlerInheritance
Section titled “Inheritance”object ← WebhookDeliveryJobHandler
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”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).
Constructors
Section titled “Constructors”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)Parameters
Section titled “Parameters”store IWebhookStore
httpClient WebhookHttpClient
optionsMonitor IOptionsMonitor<AgentPrismWebhookOptions>
configuration IConfiguration?
timeProvider TimeProvider?
logger ILogger<WebhookDeliveryJobHandler>?
egressOptions IOptionsMonitor<AgentPrismEgressOptions>?
Remarks
Section titled “Remarks”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).
Properties
Section titled “Properties”The job kind this handler can execute.
public JobKind Kind { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ExecuteAsync(JobContext, CancellationToken)
Section titled “ ExecuteAsync(JobContext, CancellationToken)”Executes the job.
public ValueTask ExecuteAsync(JobContext context, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”context JobContext
The job context: record, items, reporting, and cancellation check.
cancellationToken CancellationToken
The cancellation token (triggered when the worker shuts down).
Returns
Section titled “Returns”The completion task.
Remarks
Section titled “Remarks”If the handler throws, the job is retried with IJobStore.ReleaseForRetryAsync (if the attempt limit is not exceeded) or marked as JobStatus.Failed.