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 Summary
Modifier and TypeMethodDescriptionintGets the number of targets delivered, in-session or by a transport: theDeliveryOutcome.DELIVERED_IN_SESSIONandDeliveryOutcome.DELIVEREDcounts together.Gets the message ID the server assigned to the notification, carried to the device asdata.iizi.messageand quoted by every receipt and action event of it.Gets the number of targets per outcome, counted fromgetTargetOutcomes().Gets the outcome of every target the send matched, in no particular order.
Method Details
getMessageID
String getMessageID()Gets the message ID the server assigned to the notification, carried to the device asdata.iizi.messageand 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 fromgetTargetOutcomes().- 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: theDeliveryOutcome.DELIVERED_IN_SESSIONandDeliveryOutcome.DELIVEREDcounts together.- Returns:
- The delivered count.