Interface PushNotificationResponse<T extends ApnsPushNotification>

  • Type Parameters:
    T - the type of push notification

    public interface PushNotificationResponse<T extends ApnsPushNotification>
    A response from the APNs gateway indicating whether a notification was accepted or rejected.
    Since:
    0.5
    Author:
    Jon Chambers
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      UUID getApnsId()
      Returns the ID assigned to this push notification by the APNs server.
      T getPushNotification()
      Returns the original push notification sent to the APNs gateway.
      String getRejectionReason()
      Returns the reason for rejection reported by the APNs gateway.
      Date getTokenInvalidationTimestamp()
      If the sent push notification was rejected because the destination token is no longer valid, returns the most recent time at which the APNs gateway confirmed that the token is no longer valid.
      boolean isAccepted()
      Indicates whether the push notification was accepted by the APNs gateway.
    • Method Detail

      • getPushNotification

        T getPushNotification()
        Returns the original push notification sent to the APNs gateway.
        Returns:
        the original push notification sent to the APNs gateway
        Since:
        0.5
      • isAccepted

        boolean isAccepted()
        Indicates whether the push notification was accepted by the APNs gateway.
        Returns:
        true if the push notification was accepted or false if it was rejected
        Since:
        0.5
      • getApnsId

        UUID getApnsId()
        Returns the ID assigned to this push notification by the APNs server.
        Returns:
        the ID assigned to this push notification by the APNs server
      • getRejectionReason

        String getRejectionReason()
        Returns the reason for rejection reported by the APNs gateway. If the notification was accepted, the rejection reason will be null.
        Returns:
        the reason for rejection reported by the APNs gateway, or null if the notification was not rejected
        Since:
        0.5
      • getTokenInvalidationTimestamp

        Date getTokenInvalidationTimestamp()
        If the sent push notification was rejected because the destination token is no longer valid, returns the most recent time at which the APNs gateway confirmed that the token is no longer valid. Callers should stop attempting to send notifications to the expired token unless the token has been re-registered more recently than the returned timestamp.
        Returns:
        the time at which the token for the sent push notification became invalid, or null if the push notification was either accepted or rejected for a reason other than token invalidation
        Since:
        0.5