|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ApnsConnectionListener<T extends ApnsPushNotification>
An ApnsConnectionListener receives lifecycle events from ApnsConnection instances. Handler methods
are called from IO threads in the connection's event loop, and as such handler method implementations must
not perform blocking operations. Blocking operations should be dispatched in separate threads.
| Method Summary | |
|---|---|
void |
handleConnectionClosure(ApnsConnection<T> connection)
Indicates that the given connection has disconnected from the previously-connected APNs gateway and can no longer send push notifications. |
void |
handleConnectionFailure(ApnsConnection<T> connection,
Throwable cause)
Indicates that the given connection attempted to connect to an APNs gateway, but failed. |
void |
handleConnectionSuccess(ApnsConnection<T> connection)
Indicates that the given connection successfully connected to an APNs gateway and is ready to send push notifications. |
void |
handleConnectionWritabilityChange(ApnsConnection<T> connection,
boolean writable)
Indicates that the given connection has changed its writability state. |
void |
handleRejectedNotification(ApnsConnection<T> connection,
T rejectedNotification,
RejectedNotificationReason reason)
Indicates that a notification sent via the given connection was definitively rejected by the APNs gateway. |
void |
handleUnprocessedNotifications(ApnsConnection<T> connection,
Collection<T> unprocessedNotifications)
Indicates that notifications that had previously been sent to an APNs gateway by the given connection were not processed by the gateway and should be sent again later. |
void |
handleWriteFailure(ApnsConnection<T> connection,
T notification,
Throwable cause)
Indicates that the given connection failed to send a push notification to an APNs gateway. |
| Method Detail |
|---|
void handleConnectionSuccess(ApnsConnection<T> connection)
connection - the connection that completed its connection attempt
void handleConnectionFailure(ApnsConnection<T> connection,
Throwable cause)
connection - the connection that failed to connect to an APNs gatewaycause - the cause of the failure
void handleConnectionWritabilityChange(ApnsConnection<T> connection,
boolean writable)
connection - the connection whose writability has changedwritable - true if the connection has become writable or false if it has become unwritablevoid handleConnectionClosure(ApnsConnection<T> connection)
connection - the connection that has been disconnected and is no longer active
void handleWriteFailure(ApnsConnection<T> connection,
T notification,
Throwable cause)
connection - the connection that attempted to deliver the notificationnotification - the notification that could not be writtencause - the cause of the write failure
void handleRejectedNotification(ApnsConnection<T> connection,
T rejectedNotification,
RejectedNotificationReason reason)
connection - the connection that sent the notification that was rejectedrejectedNotification - the notification that was rejectedreason - the reason for the rejectionhandleConnectionClosure(ApnsConnection),
handleUnprocessedNotifications(ApnsConnection, Collection)
void handleUnprocessedNotifications(ApnsConnection<T> connection,
Collection<T> unprocessedNotifications)
connection - the connection that sent the notifications that were not processedunprocessedNotifications - the notifications known to have not been processed by the APNs gateway
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||