public interface ApnsClientMetricsListener
A metrics listener receives events from an ApnsClient
that can be used to measure the performance and
behavior of the client. Although the information sent to a metrics listener is generally available by other means,
it is provided to listeners in a simplified form for ease of consumption and aggregation.
The information provided to metrics listeners is intended only to measure the performance and behavior of an
ApnsClient
; metrics listeners should never be used to drive business logic.
ApnsClient.setMetricsListener(ApnsClientMetricsListener)
Modifier and Type | Method and Description |
---|---|
void |
handleConnectionAttemptFailed(ApnsClient<? extends ApnsPushNotification> apnsClient)
Indicates that a previously-started connection attempt failed.
|
void |
handleConnectionAttemptStarted(ApnsClient<? extends ApnsPushNotification> apnsClient)
Indicates that the client has started an attempt to connect to an APNs server.
|
void |
handleConnectionAttemptSucceeded(ApnsClient<? extends ApnsPushNotification> apnsClient)
Indicates that a previously-started connection attempt completed successfully.
|
void |
handleNotificationAccepted(ApnsClient<? extends ApnsPushNotification> apnsClient,
long notificationId)
Indicates that a notification that was previously sent to an APNs server was accepted by the server.
|
void |
handleNotificationRejected(ApnsClient<? extends ApnsPushNotification> apnsClient,
long notificationId)
Indicates that a notification that was previously sent to an APNs server was rejected by the server.
|
void |
handleNotificationSent(ApnsClient<? extends ApnsPushNotification> apnsClient,
long notificationId)
Indicates that a notification was sent to the APNs server.
|
void |
handleWriteFailure(ApnsClient<? extends ApnsPushNotification> apnsClient,
long notificationId)
Indicates that an attempt to send a push notification failed before the notification was processed by the APNs
server.
|
void handleWriteFailure(ApnsClient<? extends ApnsPushNotification> apnsClient, long notificationId)
apnsClient
- the client that sent the notificationnotificationId
- an opaque identifier for the push notification that can be used to correlate this event
with other events related to the same notificationvoid handleNotificationSent(ApnsClient<? extends ApnsPushNotification> apnsClient, long notificationId)
apnsClient
- the client that sent the notificationnotificationId
- an opaque identifier for the push notification that can be used to correlate this event
with other events related to the same notificationvoid handleNotificationAccepted(ApnsClient<? extends ApnsPushNotification> apnsClient, long notificationId)
apnsClient
- the client that sent the notificationnotificationId
- an opaque identifier for the push notification that can be used to correlate this event
with other events related to the same notificationvoid handleNotificationRejected(ApnsClient<? extends ApnsPushNotification> apnsClient, long notificationId)
apnsClient
- the client that sent the notificationnotificationId
- an opaque identifier for the push notification that can be used to correlate this event
with other events related to the same notificationvoid handleConnectionAttemptStarted(ApnsClient<? extends ApnsPushNotification> apnsClient)
apnsClient
- the client that started the connection attemptvoid handleConnectionAttemptSucceeded(ApnsClient<? extends ApnsPushNotification> apnsClient)
apnsClient
- the client that started the connection attemptvoid handleConnectionAttemptFailed(ApnsClient<? extends ApnsPushNotification> apnsClient)
apnsClient
- the client that started the connection attemptCopyright © 2013–2016 RelayRides. All rights reserved.