-
public interface DeliveryImplementations of this interface deliver Error Reports and Sessions captured to the Bugsnag API.
A default Delivery implementation is provided as part of Bugsnag initialization, but you may wish to use your own implementation if you have requirements such as pinning SSL certificates, for example.
Any custom implementation must be capable of sending Error Reports and Sessions as documented at https://docs.bugsnag.com/api/
-
-
Method Summary
Modifier and Type Method Description abstract DeliveryStatusdeliver(Session payload, DeliveryParams deliveryParams)Posts an array of sessions to the Bugsnag Session Tracking API. abstract DeliveryStatusdeliver(EventPayload payload, DeliveryParams deliveryParams)Posts an Error Report to the Bugsnag Error Reporting API. -
-
Method Detail
-
deliver
abstract DeliveryStatus deliver(Session payload, DeliveryParams deliveryParams)
Posts an array of sessions to the Bugsnag Session Tracking API.
This request must be delivered to the endpoint specified in deliveryParams with the given HTTP headers.
You should return the DeliveryStatus which best matches the end-result of your delivery attempt. Bugsnag will use the return value to decide whether to delete the payload if it was cached on disk, or whether to reattempt delivery later on.
For example, a 2xx status code will indicate success so you should return DeliveryStatus.DELIVERED. Most 4xx status codes would indicate an unrecoverable error, so the report should be dropped using DeliveryStatus.FAILURE. For all other scenarios, delivery should be attempted again later by using DeliveryStatus.UNDELIVERED.
- Parameters:
payload- The session tracking payloaddeliveryParams- The delivery parameters to be used for this request
-
deliver
abstract DeliveryStatus deliver(EventPayload payload, DeliveryParams deliveryParams)
Posts an Error Report to the Bugsnag Error Reporting API.
This request must be delivered to the endpoint specified in deliveryParams with the given HTTP headers.
You should return the DeliveryStatus which best matches the end-result of your delivery attempt. Bugsnag will use the return value to decide whether to delete the payload if it was cached on disk, or whether to reattempt delivery later on.
For example, a 2xx status code will indicate success so you should return DeliveryStatus.DELIVERED. Most 4xx status codes would indicate an unrecoverable error, so the report should be dropped using DeliveryStatus.FAILURE. For all other scenarios, delivery should be attempted again later by using DeliveryStatus.UNDELIVERED.
See [https://docs.bugsnag.com/api/error-reporting/] (https://docs.bugsnag.com/api/error-reporting/)
- Parameters:
payload- The error payloaddeliveryParams- The delivery parameters to be used for this request
-
-
-
-