public interface ApnsDelegate
Modifier and Type | Field and Description |
---|---|
static ApnsDelegate |
EMPTY
A no operation delegate that does nothing!
|
Modifier and Type | Method and Description |
---|---|
void |
cacheLengthExceeded(int newCacheLength)
The resend cache needed a bigger size (while resending messages)
|
void |
connectionClosed(DeliveryError e,
int messageIdentifier)
The connection was closed and/or an error packet was received while
monitoring was turned on.
|
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)
A number of notifications has been queued for resending due to a error-response
packet being received.
|
static final ApnsDelegate EMPTY
void messageSent(ApnsNotification message, boolean resent)
message
- the notification that was sentresent
- whether the notification was resent after an errorvoid messageSendFailed(ApnsNotification message, Throwable e)
message
- the notification that was attempted to be sente
- the cause and description of the failurevoid connectionClosed(DeliveryError e, int messageIdentifier)
e
- the delivery errormessageIdentifier
- id of the message that failedvoid cacheLengthExceeded(int newCacheLength)
newCacheLength
- new size of the resend cache.void notificationsResent(int resendCount)
resendCount
- the number of messages being queued for resendCopyright © 2015. All rights reserved.