Package 

Interface Delivery


  • 
    public interface Delivery
    
                        

    Implementations 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 DeliveryStatus deliver(Session payload, DeliveryParams deliveryParams) Posts an array of sessions to the Bugsnag Session Tracking API.
      abstract DeliveryStatus deliver(EventPayload payload, DeliveryParams deliveryParams) Posts an Error Report to the Bugsnag Error Reporting API.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.

        See https://docs.bugsnag.com/api/sessions/

        Parameters:
        payload - The session tracking payload
        deliveryParams - 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 payload
        deliveryParams - The delivery parameters to be used for this request