com.notnoop.apns
Class ApnsDelegateAdapter

java.lang.Object
  extended by com.notnoop.apns.ApnsDelegateAdapter
All Implemented Interfaces:
ApnsDelegate

public class ApnsDelegateAdapter
extends Object
implements ApnsDelegate

A NOOP delegate that does nothing!


Field Summary
 
Fields inherited from interface com.notnoop.apns.ApnsDelegate
EMPTY
 
Constructor Summary
ApnsDelegateAdapter()
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApnsDelegateAdapter

public ApnsDelegateAdapter()
Method Detail

messageSent

public void messageSent(ApnsNotification message,
                        boolean resent)
Description copied from interface: ApnsDelegate
Called when message was successfully sent to the Apple servers

Specified by:
messageSent in interface ApnsDelegate
Parameters:
message - the notification that was sent
resent - whether the notfication was resent after an error

messageSendFailed

public void messageSendFailed(ApnsNotification message,
                              Throwable e)
Description copied from interface: ApnsDelegate
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.

Specified by:
messageSendFailed in interface ApnsDelegate
Parameters:
message - the notification that was attempted to be sent
e - the cause and description of the failure

connectionClosed

public void connectionClosed(DeliveryError e,
                             int messageIdentifier)
Specified by:
connectionClosed in interface ApnsDelegate

cacheLengthExceeded

public void cacheLengthExceeded(int newCacheLength)
Specified by:
cacheLengthExceeded in interface ApnsDelegate

notificationsResent

public void notificationsResent(int resendCount)
Specified by:
notificationsResent in interface ApnsDelegate


Copyright © 2013. All Rights Reserved.