Interface WebhookHealthStrategy
- All Known Implementing Classes:
NoLongTermFailureStrategy
public interface WebhookHealthStrategy
Strategy to decide the health of Webhooks.
- Since:
- v2.7
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isInGoodStanding
(Webhook webhook) Decides whether the Webhook is in good standing.registerFailure
(Webhook webhook) Register a failed ping delivery to a Webhook.registerSuccess
(Webhook webhook) Register a successful ping delivery to a Webhook.
-
Method Details
-
registerSuccess
Register a successful ping delivery to a Webhook.- Parameters:
webhook
- Webhook that has just been successfully pinged- Returns:
- a Webhook template to update the Webhook
-
registerFailure
Register a failed ping delivery to a Webhook. It simply registers the failure, but it does not take any further action, i.e., it does not remove the Webhook.- Parameters:
webhook
- Webhook that has just been unsuccessfully pinged- Returns:
- a Webhook template to update the Webhook
-
isInGoodStanding
Decides whether the Webhook is in good standing. Applications may use this information to deactivate a Webhook that is no longer behaving. This check is made after each successful or failed Webhook ping.- Parameters:
webhook
- Webhook which status is examined.- Returns:
- true if the Webhook is in good standing.
-