com.notnoop.apns
Interface ApnsDelegate

All Known Implementing Classes:
ApnsDelegateAdapter

public interface ApnsDelegate

A delegate that gets notified of the status of notification delivery to the Apple Server. The delegate doesn't get notified when the notification actually arrives at the phone.


Field Summary
static ApnsDelegate EMPTY
          A NOOP delegate that does nothing!
 
Method Summary
 void cacheLengthExceeded(int newCacheLength)
           
 void connectionClosed(DeliveryError e, int messageIdentifier)
           
 void messageSendFailed(ApnsNotification message, Throwable e)
          Called when the delivery of the message failed for any reason If message is null, then your notification has been rejected by Apple but it has been removed from the cache so it is not possible to identify which notification caused the error.
 void messageSent(ApnsNotification message, boolean resent)
          Called when message was successfully sent to the Apple servers
 void notificationsResent(int resendCount)
           
 

Field Detail

EMPTY

static final ApnsDelegate EMPTY
A NOOP delegate that does nothing!

Method Detail

messageSent

void messageSent(ApnsNotification message,
                 boolean resent)
Called when message was successfully sent to the Apple servers

Parameters:
message - the notification that was sent
resent - whether the notfication was resent after an error

messageSendFailed

void messageSendFailed(ApnsNotification message,
                       Throwable e)
Called when the delivery of the message failed for any reason If message is null, then your notification has been rejected by Apple but it has been removed from the cache so it is not possible to identify which notification caused the error. In this case subsequent notifications may be lost. If this happens you should consider increasing your cacheLength value to prevent data loss.

Parameters:
message - the notification that was attempted to be sent
e - the cause and description of the failure

connectionClosed

void connectionClosed(DeliveryError e,
                      int messageIdentifier)

cacheLengthExceeded

void cacheLengthExceeded(int newCacheLength)

notificationsResent

void notificationsResent(int resendCount)


Copyright © 2013. All Rights Reserved.