Interface IPushSendResult

All Known Implementing Classes:
PushSendResultImpl

public interface IPushSendResult
The result of a send made through the Push Notification API, with the outcome of every target.

Per target, not only in aggregate. A send to a user reaches each of the user's devices separately, and some may be offline, unsubscribed on the device or rejected by their push service. getTargetOutcomes() has one element per target, so a developer sees which device failed and why; getOutcomeCounts() is derived from the same list, so the two can never disagree.

Distinct from the engine's PushResult, which describes a ServerAdmin send by its routing plan and regions. This result describes an application's send by its targets.

Author:
Christopher Mindus
  • Method Details

    • getMessageID

      String getMessageID()
      Gets the message ID the server assigned to the notification, carried to the device as data.iizi.message and quoted by every receipt and action event of it.
      Returns:
      The message ID, a UUID, never null.
    • getTargetOutcomes

      List<IPushTargetOutcome> getTargetOutcomes()
      Gets the outcome of every target the send matched, in no particular order.
      Returns:
      An unmodifiable list, never null; empty when nothing matched.
    • getOutcomeCounts

      Map<DeliveryOutcome, Integer> getOutcomeCounts()
      Gets the number of targets per outcome, counted from getTargetOutcomes().
      Returns:
      An unmodifiable map holding only the outcomes that occurred, never null.
    • getDeliveredCount

      int getDeliveredCount()
      Gets the number of targets delivered, in-session or by a transport: the DeliveryOutcome.DELIVERED_IN_SESSION and DeliveryOutcome.DELIVERED counts together.
      Returns:
      The delivered count.